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.
Asked
Active
Viewed 559 times
3
-
That's not how it works. The Chromium source code includes source code for all the major operating systems and most of the codes are shared too. Just follow the instructions specified in the guidelines – Asesh Sep 21 '20 at 07:04
-
I don't want to download full source nor build it. I just want to check out some codes in chromium browser source code. I saw guidelines and found nothing proper for me. – Rapunzel Sep 21 '20 at 08:44
2 Answers
3
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.

kinshukdua
- 1,944
- 1
- 5
- 15
1
I don't want to download full source nor build it. I just want to check out some codes in chromium browser source code
Since it is a Git repository, you can use a filter clone (I detail its syntax here):
git clone \
--depth 1 \
--filter=blob:none \
--no-checkout \
https://github.com/chromium/chromium \
;
cd chromium
git checkout master -- chrome
You also have the sparse cone option:
git clone \
--depth 1 \
--filter=blob:none \
--no-checkout \
https://github.com/chromium/chromium \
;
cd chromium
git sparse-checkout init --cone
git sparse-checkout set chrome

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
Thanks for your reply. I tried both of them but nothing seems to work. The first one causes sha1 error and the second one does not change anything. – Rapunzel Sep 22 '20 at 08:46
-
-
-
-
I think so. I think it has something to do with the remote repository. – Rapunzel Sep 22 '20 at 08:54