Commit 54434e7e authored by Eli Ribble's avatar Eli Ribble Committed by Commit Bot

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/+/1592572Reviewed-by: 's avatarAaron Gable <agable@chromium.org>
Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Eli Ribble <eliribble@chromium.org>
parent a541b28d
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment