Reputation: 419
I want to clone/download clang-r428724. I tried:
┌──(root㉿kali)-[~/Documents]
└─# git clone https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+log/refs/heads/master/clang-r428724
Cloning into 'clang-r428724'...
fatal: repository 'https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+log/refs/heads/master/clang-r428724/' not found
Upvotes: -1
Views: 125
Reputation: 94827
As @evolutionxbox rightly said in the comment you need to split the web URL into a repository URL and a branch. Also you can see the branch was removed, restored and finally removed so you cannot clone the branch. You need to clone another branch and checkout the last commit of branch clang-r428724
, commit 208f4a06. The commit was created at Aug 27 2021 so let clone only up to that date.
Full clone git clone --shallow-since=2021-08-27 https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/
requires 20G of traffic and probably the same amount of disk space. Too much. Most probably you don't need all of this. To clone as little as possible do:
git clone --filter=blob:none --no-checkout --shallow-since=2021-08-27 https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/ android-linux-x86
cd android-linux-x86
git switch -c clang-r428724 208f4a06a56b6c2b1efdf18bfb5ad3224f42d17e
The last command creates a branch from the named commit and switches to the branch. The command is slow — it fetches all blobs and trees for the commit, about 2G. Still better than full 20G. Then it checks out 28000 files, also takes some time and disk, 7G.
Upvotes: 0