diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-07-25 11:45:03 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-07-25 11:45:03 +0400 |
commit | 130b04ab37d74e574d525df7948b963b13c6bdbf (patch) | |
tree | a39a6d5e46d3ee24dcc1f2f141efe4f0a20a9581 /t | |
parent | a7c1ef3e03985c70aeb0825634471bb6240f4fcb (diff) | |
parent | 7f3140cd23f126e578ccaaea8c2cebe36824a7ac (diff) |
Merge branch 'js/maint-graft-unhide-true-parents'
* js/maint-graft-unhide-true-parents:
git repack: keep commits hidden by a graft
Add a test showing that 'git repack' throws away grafted-away parents
Conflicts:
git-repack.sh
Diffstat (limited to 't')
-rwxr-xr-x | t/t7700-repack.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh index 87c9b0e121..f4aa054750 100755 --- a/t/t7700-repack.sh +++ b/t/t7700-repack.sh @@ -149,5 +149,17 @@ test_expect_success 'local packed unreachable obs that exist in alternate ODB ar test_must_fail git show $csha1 ' +test_expect_success 'objects made unreachable by grafts only are kept' ' + test_tick && + git commit --allow-empty -m "commit 4" && + H0=$(git rev-parse HEAD) && + H1=$(git rev-parse HEAD^) && + H2=$(git rev-parse HEAD^^) && + echo "$H0 $H2" > .git/info/grafts && + git reflog expire --expire=now --expire-unreachable=now --all && + git repack -a -d && + git cat-file -t $H1 + ' + test_done |