From: Junio C Hamano Date: Thu, 15 Feb 2007 09:37:00 GMT Subject: [PATCH +1] Dissociating a repository from its alternates Message-ID: <7vsld7g3sz.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <7vabzfhn9q.fsf@assigned-by-dhcp.cox.net> On top of the previous patch. This is needed to: - reject "repack -A -l", which does not make any sense; you want to repack the objects you borrow from the alternates. - make "repack -A" without "-a" to work. These operations corrupted the repository with the previous patch alone. Signed-off-by: Junio C Hamano --- git-repack.sh | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/git-repack.sh b/git-repack.sh index 774286e..66b5039 100755 --- a/git-repack.sh +++ b/git-repack.sh @@ -25,6 +25,10 @@ do esac shift done +if test "$nuke_alternates,$local" = "t,--local" +then + die "-A and -l are incompatible" +fi # Later we will default repack.UseDeltaBaseOffset to true default_dbo=false @@ -45,7 +49,7 @@ case ",$all_into_one,$nuke_alternates," in args='--unpacked --incremental' ;; ,,t,) - args='--incremental --ignore-alternate-pack' + args='--ignore-alternate-pack' ;; ,t,*) if [ -d "$PACKDIR" ]; then