diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-10-20 15:22:41 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-10-20 15:22:42 -0700 |
commit | b05c2f9ed48adfd9670b28ecdd5c55a4e4698704 (patch) | |
tree | 6392e6bbfc2cf79e3e8a9b3cac10149310e94226 /t | |
parent | Merge branch 'rd/test-path-utils' into maint (diff) | |
parent | pack-objects: do not get distracted by broken symrefs (diff) | |
download | tgif-b05c2f9ed48adfd9670b28ecdd5c55a4e4698704.tar.xz |
Merge branch 'js/gc-with-stale-symref' into maint
"git gc" used to barf when a symbolic ref has gone dangling
(e.g. the branch that used to be your upstream's default when you
cloned from it is now gone, and you did "fetch --prune").
* js/gc-with-stale-symref:
pack-objects: do not get distracted by broken symrefs
gc: demonstrate failure with stale remote HEAD
Diffstat (limited to 't')
-rwxr-xr-x | t/t6500-gc.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t6500-gc.sh b/t/t6500-gc.sh index 63194d819e..5d7d414617 100755 --- a/t/t6500-gc.sh +++ b/t/t6500-gc.sh @@ -30,4 +30,17 @@ test_expect_success 'gc -h with invalid configuration' ' test_i18ngrep "[Uu]sage" broken/usage ' +test_expect_success '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 |