git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH +1] Dissociating a repository from its alternates

From
Junio C Hamano <junkio@cox.net>
Date
Feb 15, 2007, 09:37 UTC
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 <junkio@cox.net>
---
 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
Previous: Junio C HamanoNext: Johannes Schindelin
Message 2 of 9 in “Dissociating a repository from its alternates”
  1. Dissociating a repository from its alternatesJunio C Hamano, Feb 15, 2007
  2. Dissociating a repository from its alternatesJunio C Hamano, Feb 15, 2007
  3. Johannes SchindelinFeb 15, 2007
  4. Junio C HamanoFeb 16, 2007
  5. Michael HendricksOct 22, 2007
  6. Johannes SchindelinOct 22, 2007
  7. Michael HendricksOct 22, 2007
  8. Johannes SchindelinOct 23, 2007
  9. James CloosFeb 16, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.