Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download a specific folder of Chromium code?

Recently, I tried to download source code for chromium browser. In details, I just wanted to download code at https://github.com/chromium/chromium/tree/master/chrome. I tried several methods such as Downgit and SVN but nothing worked. The thing is, the methods I used worked on other sites and folders. I can't understand. Could anyone help me? If not, please let me know any other place where I can download desktop version chromium browser source code. Thanks in advance.

like image 683
Rapunzel Avatar asked Oct 18 '25 14:10

Rapunzel


1 Answers

I found this question when I was looking for the same thing and as it turns out @VonC's solution is almost right. You do

git clone \
--depth 1 \
--filter=blob:none \
--no-checkout \
https://github.com/chromium/chromium \
;
cd chromium

but before you checkout you just set core.fscache = false via the

git config core.fscache false

command and then continue with

 git sparse-checkout init --cone
 git sparse-checkout set chrome

The sha1 error is not your fault and is just a bug with git, in another similar post an issue was opened about it and this fscache was the solution they gave for the time being. If you're on Linux you don't even have to do this. The commands mentioned above would work! Cheers.

like image 119
kinshukdua Avatar answered Oct 20 '25 04:10

kinshukdua



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!