Commit 34b4e983 authored by smut@google.com's avatar smut@google.com

Revert "Gclient: Don't check if repository is clean if --force is passed in"

This reverts commit 3f0dacf0.

Reason for revert:
Is causing staged changes to be reverted.

BUG=607913
TBR=hinoka,dnj

Review URL: https://codereview.chromium.org/1983963002 .

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300598 0039d316-1c4b-4281-b951-d872f2087c98
parent 55cb27ed
......@@ -553,9 +553,7 @@ class GitWrapper(SCMWrapper):
if current_type == 'detached':
# case 0
if not options.force:
# Don't do this check if nuclear option is on.
self._CheckClean(rev_str)
self._CheckClean(rev_str)
self._CheckDetachedHead(rev_str, options)
if self._Capture(['rev-list', '-n', '1', 'HEAD']) == revision:
self.Print('Up-to-date; skipping checkout.')
......@@ -565,7 +563,7 @@ class GitWrapper(SCMWrapper):
self._Checkout(
options,
revision,
force=(options.force or options.delete_unversioned_trees),
force=(options.force and options.delete_unversioned_trees),
quiet=True,
)
if not printed_path:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment