From 54434e7e1dabdc79232c3eeca06c44e5c0aabab9 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Fri, 24 May 2019 00:41:15 +0000 Subject: [PATCH] Ignore git submodules when calculating dirty files. This is in keeping with git's default behavior for other porcelain commands. It also makes it more tenable for projects to introduce submodules instead of repo manifests without breaking git-cl upload and similar tools. Bug: 958499 Test: Run locally Change-Id: Id9595271bf89aa8ba928026501a4c9487e5abf8e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1592572 Reviewed-by: Aaron Gable Reviewed-by: Dirk Pranke Commit-Queue: Eli Ribble --- git_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git_common.py b/git_common.py index f5edfb167..8e8135744 100644 --- a/git_common.py +++ b/git_common.py @@ -777,7 +777,7 @@ def set_config(option, value, scope='local'): def get_dirty_files(): # Make sure index is up-to-date before running diff-index. run_with_retcode('update-index', '--refresh', '-q') - return run('diff-index', '--name-status', 'HEAD') + return run('diff-index', '--ignore-submodules', '--name-status', 'HEAD') def is_dirty_git_tree(cmd):