From c5dab1505083037964c61f513db6940bcf2f1cc0 Mon Sep 17 00:00:00 2001 From: Robert Iannucci Date: Tue, 11 Jul 2023 23:56:17 +0000 Subject: [PATCH] [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 Reviewed-by: Aravind Vasudevan Commit-Queue: Aravind Vasudevan --- git_rebase_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git_rebase_update.py b/git_rebase_update.py index e557ab12a9..c7bae67f34 100755 --- a/git_rebase_update.py +++ b/git_rebase_update.py @@ -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: