[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>
diff --git a/git_rebase_update.py b/git_rebase_update.py
index e557ab1..c7bae67 100755
--- a/git_rebase_update.py
+++ b/git_rebase_update.py
@@ -258,7 +258,7 @@
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: