[PATCH +1] Dissociating a repository from its alternates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <junkio@xxxxxxx>
---

 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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]