From 252ff1feade7a108849642ad2606efa5f212dfd1 Mon Sep 17 00:00:00 2001 From: Josip Sokcevic Date: Mon, 1 Jun 2020 23:08:00 +0000 Subject: [PATCH] Remove rev-parse --verify FETCH_HEAD It's not used and causes some problems if refs on clone aren't set properly. R=ehmaldonado@chromium.org Bug: 1049610 Change-Id: I71c1215c9a3355dd54e2d66860d755c6fe8032db Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2224853 Reviewed-by: Edward Lesmes Commit-Queue: Josip Sokcevic --- gclient_scm.py | 3 --- subprocess2.py | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gclient_scm.py b/gclient_scm.py index 33684e6619..293dbfbe7e 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -1327,9 +1327,6 @@ class GitWrapper(SCMWrapper): fetch_cmd.append('--quiet') self._Run(fetch_cmd, options, show_header=options.verbose, retry=True) - # Return the revision that was fetched; this will be stored in 'FETCH_HEAD' - return self._Capture(['rev-parse', '--verify', 'FETCH_HEAD']) - def _SetFetchConfig(self, options): """Adds, and optionally fetches, "branch-heads" and "tags" refspecs if requested.""" diff --git a/subprocess2.py b/subprocess2.py index c40d1112c5..e5ccc93a39 100644 --- a/subprocess2.py +++ b/subprocess2.py @@ -200,6 +200,8 @@ def call(args, **kwargs): Automatically convert stdout=PIPE or stderr=PIPE to VOID. In no case they can be returned since no code path raises subprocess2.CalledProcessError. + + Returns exit code. """ if kwargs.get('stdout') == PIPE: kwargs['stdout'] = VOID