[git-rebase-update] Ignore submodules when checking tree status.

Noticed while working on the infra repos.

Currently `git rebase-update` will do a `git freeze`, then run a
`git status` to make sure the tree is clean... however this status call
currently considers submodule state, which leads to a really confusing
experience. `git rebase-update` is trying to ensure that the FILES on
disk won't be goobered during the rebase process... a process which
essentially ignores submodule state entirely.

This CL just makes `git rebase-update` ignore submodule diffs.

R=aravindvasudev@google.com

Change-Id: I9d546ac9ef0c0ba6ac9918f08fb5163ab18aebb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4680280
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
changes/80/4680280/2
Robert Iannucci 2 years ago committed by LUCI CQ
parent 878c74a134
commit c5dab15050

@ -258,7 +258,7 @@ def main(args=None):
os.chdir(git.run('rev-parse', '--show-toplevel'))
if git.current_branch() == 'HEAD':
if git.run('status', '--porcelain'):
if git.run('status', '--porcelain', '--ignore-submodules=all'):
print('Cannot rebase-update with detached head + uncommitted changes.')
return 1
else:

Loading…
Cancel
Save