author | Johannes Schindelin <johannes.schindelin@gmx.de> | |
Thu, 23 Jul 2009 15:33:49 +0000 (17:33 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 24 Jul 2009 16:10:16 +0000 (09:10 -0700) | ||
commit | 7f3140cd23f126e578ccaaea8c2cebe36824a7ac | |
tree | d195e6f3e3002fdd55ef93ed10c087f22514cca3 | tree | snapshot |
parent | 1ec648278e3a3e5a04dfaac916f68e2f675ff9ea | commit | 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>
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>
Documentation/git-pack-objects.txt | diff | blob | history | |
builtin-pack-objects.c | diff | blob | history | |
cache.h | diff | blob | history | |
commit.c | diff | blob | history | |
environment.c | diff | blob | history | |
git-repack.sh | diff | blob | history | |
t/t7700-repack.sh | diff | blob | history |