Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2018-09-03 17:49:23 +0300
committerJunio C Hamano <gitster@pobox.com>2018-09-13 01:17:46 +0300
commit12b1c50a426d84aadd9909ed42b1ed0b2d12d7e9 (patch)
tree3b0c117df7d5941a3ac5a2eae5c80dc854656c72 /t/t5504-fetch-receive-strict.sh
parentf706c42bab5a2ac4af45e0df7853af1fc5346c45 (diff)
fsck: document that skipList input must be unabbreviated
Abbreviating the SHA-1s in the skipList input has never worked, but the documentation hasn't unambiguously stated that this is an error, and there was no test for it. Let's fix both since it would be easy for some later refactoring e.g. switch to accidentally switch to a looser OID parsing function, causing the tests before this change to pass, but for older versions of git to be incompatible with the new skipList format. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5504-fetch-receive-strict.sh')
-rwxr-xr-xt/t5504-fetch-receive-strict.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh
index 38aaf3b928..96bf9facbd 100755
--- a/t/t5504-fetch-receive-strict.sh
+++ b/t/t5504-fetch-receive-strict.sh
@@ -190,6 +190,12 @@ test_expect_failure 'fsck no garbage output from comments & empty lines errors'
test_line_count = 1 err-with-empty-line
'
+test_expect_success 'fsck with invalid abbreviated skipList input' '
+ echo $commit | test_copy_bytes 20 >SKIP.abbreviated &&
+ test_must_fail git -c fsck.skipList=SKIP.abbreviated fsck 2>err-abbreviated &&
+ test_i18ngrep "^fatal: Invalid SHA-1: " err-abbreviated
+'
+
test_expect_success 'push with receive.fsck.skipList' '
git push . $commit:refs/heads/bogus &&
rm -rf dst &&