diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2009-07-23 19:33:49 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-07-24 20:10:16 +0400 |
commit | 7f3140cd23f126e578ccaaea8c2cebe36824a7ac (patch) | |
tree | d195e6f3e3002fdd55ef93ed10c087f22514cca3 /t | |
parent | 1ec648278e3a3e5a04dfaac916f68e2f675ff9ea (diff) |
git repack: keep commits hidden by a graft
When you have grafts that pretend that a given commit has different
parents than the ones recorded in the commit object, it is dangerous
to let 'git repack' remove those hidden parents, as you can easily
remove the graft and end up with a broken repository.
So let's play it safe and keep those parent objects and everything
that is reachable by them, in addition to the grafted parents.
As this behavior can only be triggered by git pack-objects, and as that
command handles duplicate parents gracefully, we do not bother to cull
duplicated parents that may result by using both true and grafted
parents.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t7700-repack.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh index a4dddb728f..f4aa054750 100755 --- a/t/t7700-repack.sh +++ b/t/t7700-repack.sh @@ -149,7 +149,7 @@ test_expect_success 'local packed unreachable obs that exist in alternate ODB ar test_must_fail git show $csha1 ' -test_expect_failure 'objects made unreachable by grafts only are kept' ' +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) && |