gc: demonstrate failure with stale remote HEAD

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Sep 28, 2015 at 16:01 UTC 8c845cde99dcfc9821f1182623248dee9ebb4227
1 file changed +13
t/t6500-gc.sh
+13
@@ -30,4 +30,17 @@ test_expect_success 'gc -h with invalid configuration' '
30 test_i18ngrep "[Uu]sage" broken/usage
31 '
32
33 +test_expect_failure 'gc is not aborted due to a stale symref' '
34 + git init remote &&
35 + (
36 + cd remote &&
37 + test_commit initial &&
38 + git clone . ../client &&
39 + git branch -m develop &&
40 + cd ../client &&
41 + git fetch --prune &&
42 + git gc
43 + )
44 +'
45 +
46 test_done