Update the index in SendUpstream before tree check.

BUG=none
TEST=git cl dcommit/push performs an index update before
checking if the tree is dirty
Review URL: http://codereview.chromium.org/6172003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@70908 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
chase@chromium.org 15 years ago
parent 5d0dc43e26
commit c76e675fb5

@ -859,6 +859,8 @@ def SendUpstream(parser, args, cmd):
base_branch = args[0]
# Make sure index is up-to-date before running diff-index.
RunGit(['update-index', '--refresh', '-q'], error_ok=True)
if RunGit(['diff-index', 'HEAD']):
print 'Cannot %s with a dirty tree. You must commit locally first.' % cmd
return 1

Loading…
Cancel
Save