gclient: fetch only what's needed

To reduce server load, only fetch the ref we need.

TEST=ran presubmit tests

Review URL: http://codereview.chromium.org/2856038

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@52941 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
msb@chromium.org 15 years ago
parent 38b04f839e
commit 238c918a40

@ -257,7 +257,13 @@ class GitWrapper(SCMWrapper):
# Update the remotes first so we have all the refs.
for _ in range(10):
try:
remote_output, remote_err = scm.GIT.Capture(
if current_type == "branch":
remote_output, remote_err = scm.GIT.Capture(
['fetch'] + verbose + ['origin', revision],
self.checkout_path,
print_error=False)
else:
remote_output, remote_err = scm.GIT.Capture(
['remote'] + verbose + ['update'],
self.checkout_path,
print_error=False)

Loading…
Cancel
Save