Does gclient sync pull in branch/history of modules?

30 views
Skip to first unread message

Duaa Abdelgadir

unread,
Oct 21, 2016, 5:55:47 PM10/21/16
to Chromium-discuss
I've been looking closer into the depot_tools and trying to figure out what exactly gclient sync is doing. I tried running it with -v and i believe it looks like its accessing the remote repo at each checkout?I If branch history is local, why doesnt it checkout the appropriate revisions from the cache_dir folder? If I comment out the runGit for actual fetching, it looks like its accessing cache_dir folder

So basically my question is: Why does gclient sync need to access remote repository for revisions which have not changed, and which file/function within depot tools is accessing it?

example of what I mean: the first one looks like its grabbing from https://chromium.googlesource.com/chromium/buildtools while the second one looks like its grabbing locally

Output -v using the _fetch function in git-cache.git

________ running 'git -c core.deltaBaseCacheLimit=2g fetch origin --verbose' in '/home/user/chromium/src/buildtools'
[0:00:00] From https://chromium.googlesource.com/chromium/buildtools
[0:00:00]  = [up to date]      master     -> origin/master
[0:00:00] Up-to-date; skipping checkout.
Checked out revision 39b1db2ab4aa4b2ccaa263c29bdf63e7c1ee28aa
[0:00:00] Finished.
--------------------

Output without _fetch function

src/buildtools (Elapsed: 0:00:00)
----------------------------------------
[0:00:09] Started.
_____ src/buildtools at adb8bf4e8fc92aa1717bf151b862d58e6f27c4f2

________ running 'git -c core.deltaBaseCacheLimit=2g fetch origin --verbose' in '/home/user/chromium/src/src/buildtools'
[0:00:09] From /home/user/chromium/src/testdir/chromium.googlesource.com-chromium-buildtools
[0:00:09]  = [up to date]      master     -> origin/master
[0:00:09] Up-to-date; skipping checkout.
Checked out revision adb8bf4e8fc92aa1717bf151b862d58e6f27c4f2
[0:00:09] Finished.g


Thanks! Let me know if you need more clarification of the question
Reply all
Reply to author
Forward
0 new messages