Skip to content

Commit 8c845cd

Browse files
dschogitster
authored andcommitted
gc: demonstrate failure with stale remote HEAD
Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 74b6763 commit 8c845cd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

t/t6500-gc.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,17 @@ test_expect_success 'gc -h with invalid configuration' '
3030
test_i18ngrep "[Uu]sage" broken/usage
3131
'
3232

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+
3346
test_done

0 commit comments

Comments
 (0)