From 9ffd050bd70741f1082f0dffa67e68da9de84870 Mon Sep 17 00:00:00 2001 From: "kjellander@chromium.org" Date: Fri, 8 Mar 2013 15:19:39 +0000 Subject: [PATCH] Revert 186598 ("Add option to automatically fetch git "branch-heads".") Some SVN-only trybots get errors when running gclient revert with this change. I assume it's because the flag is not present for the gclient revert command, and that the code checking if options.with_branch_heads is set is common to both revert and sync. BUG=none TEST=reverted locally and gclient revert worked again. Review URL: https://chromiumcodereview.appspot.com/12616006 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@186967 0039d316-1c4b-4281-b951-d872f2087c98 --- gclient.py | 4 ---- gclient_scm.py | 11 ----------- 2 files changed, 15 deletions(-) diff --git a/gclient.py b/gclient.py index 2ad86d3cd..c19e96309 100644 --- a/gclient.py +++ b/gclient.py @@ -1476,10 +1476,6 @@ def CMDsync(parser, args): 'has multiple solutions configured and will work even ' 'if the src@ part is skipped. Note that specifying ' '--revision means your safesync_url gets ignored.') - parser.add_option('--with_branch_heads', action='store_true', - help='Clone git "branch_heads" refspecs in addition to ' - 'the default refspecs. This adds about 1/2GB to a ' - 'full checkout. (git only)') parser.add_option('-t', '--transitive', action='store_true', help='When a revision is specified (in the DEPS file or ' 'with the command-line flag), transitively update ' diff --git a/gclient_scm.py b/gclient_scm.py index ae2bd1cc0..c64a3b646 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -655,9 +655,6 @@ class GitWrapper(SCMWrapper): detach_head = True if options.verbose: clone_cmd.append('--verbose') - if options.with_branch_heads: - clone_cmd.extend(['--config', 'remote.origin.fetch=+refs/branch-heads/*:' - 'refs/remotes/branch-heads/*']) clone_cmd.extend([url, self.checkout_path]) # If the parent directory does not exist, Git clone on Windows will not @@ -680,14 +677,6 @@ class GitWrapper(SCMWrapper): try: self._Run(clone_cmd, options, cwd=self._root_dir, filter_fn=_GitFilter, print_stdout=False) - # Update the "branch-heads" remote-tracking branches, since clone - # doesn't automatically fetch those, and we might need it to checkout a - # specific revision below. - if options.with_branch_heads: - fetch_cmd = ['fetch', 'origin'] - if options.verbose: - fetch_cmd.append('--verbose') - self._Run(fetch_cmd, options) break except subprocess2.CalledProcessError, e: # Too bad we don't have access to the actual output yet.