diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2015-06-22 17:26:42 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-06-23 14:27:36 -0700 |
commit | f50c44073051820cd368be4ca520ae43f34fdf8b (patch) | |
tree | 6014b05cb8c796451fb8a5e5dac59dedeb3c86bf /t | |
parent | fsck: add a simple test for receive.fsck.<msg-id> (diff) | |
download | tgif-f50c44073051820cd368be4ca520ae43f34fdf8b.tar.xz |
fsck: disallow demoting grave fsck errors to warnings
Some kinds of errors are intrinsically unrecoverable (e.g. errors while
uncompressing objects). It does not make sense to allow demoting them to
mere warnings.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t5504-fetch-receive-strict.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh index 36024fc51a..f5d6d0ded0 100755 --- a/t/t5504-fetch-receive-strict.sh +++ b/t/t5504-fetch-receive-strict.sh @@ -136,4 +136,15 @@ test_expect_success 'push with receive.fsck.missingEmail=warn' ' grep "missingEmail" act ' +test_expect_success \ + 'receive.fsck.unterminatedHeader=warn triggers error' ' + rm -rf dst && + git init dst && + git --git-dir=dst/.git config receive.fsckobjects true && + git --git-dir=dst/.git config \ + receive.fsck.unterminatedheader warn && + test_must_fail git push --porcelain dst HEAD >act 2>&1 && + grep "Cannot demote unterminatedheader" act +' + test_done |