Thread (1 message) 1 message, 1 author, 2016-06-15
DORMANTno replies

[PATCH +1] Dissociating a repository from its alternates

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:54
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---

 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help