Fix second manpage test

Using `git diff-index` is problematic for this test, because manpages
regenerated by `make` will have a modified mtime, and `git diff-index`
(being a low-level command) does not refresh the file's mtime stored in
the index. Refreshing the mtime and other stat information stored in the
index is something that happens automatically for high-level "porcelain"
commands.

Since `git diff` will suffice for checking that no uncommitted changes
to manpages exist, use it instead.

Also, use the --exit-code option instead to see the diff output in case
of failure.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
Patrick McCarty
2018-08-17 14:18:35 -07:00
committed by Matthew Johnson
parent 7fa6cd4562
commit 67fd7f572b
+1 -1
View File
@@ -22,7 +22,7 @@ setup() {
do
[ -f "$nroff" ] || continue
echo "$nroff"
git diff-index --quiet HEAD "$nroff"
git diff --exit-code HEAD "$nroff"
done
}