From 67fd7f572bf5dcacba6b9dce990ccded10ee644a Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Fri, 17 Aug 2018 12:16:58 -0700 Subject: [PATCH] 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 --- test/documentation/manpages/test.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/documentation/manpages/test.bats b/test/documentation/manpages/test.bats index e67e21c1..11c94126 100755 --- a/test/documentation/manpages/test.bats +++ b/test/documentation/manpages/test.bats @@ -22,7 +22,7 @@ setup() { do [ -f "$nroff" ] || continue echo "$nroff" - git diff-index --quiet HEAD "$nroff" + git diff --exit-code HEAD "$nroff" done }