]> granicus.if.org Git - git/commitdiff
gc: demonstrate failure with stale remote HEAD
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 28 Sep 2015 14:01:13 +0000 (16:01 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Oct 2015 21:56:57 +0000 (14:56 -0700)
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6500-gc.sh

index 63194d819efe07af241573662c660e6e92b503f5..ed22dcc76fe14ae3bd3c83388667d034429660cb 100755 (executable)
@@ -30,4 +30,17 @@ test_expect_success 'gc -h with invalid configuration' '
        test_i18ngrep "[Uu]sage" broken/usage
 '
 
+test_expect_failure 'gc is not aborted due to a stale symref' '
+       git init remote &&
+       (
+               cd remote &&
+               test_commit initial &&
+               git clone . ../client &&
+               git branch -m develop &&
+               cd ../client &&
+               git fetch --prune &&
+               git gc
+       )
+'
+
 test_done