summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2020-06-03 14:27:55 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2020-06-03 15:49:41 -0700
commitc7f8123d6ec9d8e0b535bcc1f8faecf43bc3182e (patch)
treec92f6317b6796c81a5541daf282e261e5cb838d6 /tools
parent664668cb867fe3ce24337038c10436d3d0027d55 (diff)
downloadgjs-c7f8123d6ec9d8e0b535bcc1f8faecf43bc3182e.tar.gz
CI: Refresh index before running git-diff-index
Very obscure, but it seems that git-diff-index can think that every file in the index has been modified due to their mtime, even if their contents are the same. This seems to happen on CI, so refresh the index (using git's "convenient" --really-refresh switch).
Diffstat (limited to 'tools')
-rwxr-xr-xtools/run_iwyu.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/run_iwyu.sh b/tools/run_iwyu.sh
index f8d6a754..0ff6a5e1 100755
--- a/tools/run_iwyu.sh
+++ b/tools/run_iwyu.sh
@@ -14,6 +14,9 @@ fi
if [ $# -eq 0 ]; then
files=all
else
+ # make stat changes not show up as modifications
+ git update-index -q --really-refresh
+
files="$(git diff-tree --name-only -r $1..) $(git diff-index --name-only HEAD)"
fi