From b655dbda883a2668433a54166ff1f42cddd13c8e Mon Sep 17 00:00:00 2001 From: justincohen Date: Wed, 26 Oct 2016 14:34:58 -0700 Subject: [PATCH] Revert of Call status before reset in gclient sync. (patchset #2 id:20001 of https://codereview.chromium.org/2447813003/ ) Reason for revert: https://codereview.chromium.org/2444403003/ makes this pretty redundant. Reverting this. Original issue's description: > Call status before reset in gclient sync. > > Calling status before reset will ensure files that have no been changed do not > get deleted by reset --hard. > > BUG=642711 > > Committed: https://chromium.googlesource.com/chromium/tools/depot_tools/+/d74a7b4c14512d95cb46204bb7a70ba5666b5eb7 TBR=sdefresne@chromium.org,maruel@chromium.org,dpranke@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=642711 Review-Url: https://codereview.chromium.org/2453083002 --- gclient_scm.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/gclient_scm.py b/gclient_scm.py index 49e53f6bf..4a4e60154 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -534,13 +534,6 @@ class GitWrapper(SCMWrapper): target = 'HEAD' if options.upstream and upstream_branch: target = upstream_branch - - # Builds can create hard links which update source files' ctimes, causing - # git to become confused over what files are out-of-date. Calling - # `git status` resynchronizes git and allows `git reset --hard` to not - # re-checkout files (and thus forcing unnecessary rebuilds)". - self._Run(['status'], options) - self._Run(['reset', '--hard', target], options) if current_type == 'detached':