From c9663b16852927c2fa43cd2f747a024ede213898 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 9 Jan 2019 22:30:01 +0100 Subject: [PATCH] Fix sometimes-spurious warning about changed config.h After backing up and restoring config.h, `git diff-files` may report it as potentially-changed because it isn't sure whether the index is up to date. To avoid this, make sure that the git index is up-to-date. This fixes the warning about changed config.h that you might get when you run all.sh twice in succession, yet if you run `git status` or `git diff` everything seems up to date and you no longer get the warning because these git commands update the index. https://stackoverflow.com/questions/36367190/git-diff-files-output-changes-after-git-status --- tests/scripts/all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index e03efe8ef..b8a7da55d 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -387,7 +387,7 @@ pre_check_git () { exit 1 fi - if ! git diff-files --quiet include/mbedtls/config.h; then + if ! git diff --quiet include/mbedtls/config.h; then err_msg "Warning - the configuration file 'include/mbedtls/config.h' has been edited. " echo "You can either delete or preserve your work, or force the test by rerunning the" echo "script as: $0 --force"