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

[PATCH] Teach git-gc to only repack local (not borrowed) objects.

From
Shawn O. Pearce <spearce@spearce.org>
Date
Dec 27, 2006, 23:47 UTC
Message-ID
<20061227234753.GA16389@spearce.org>

This feature was suggested by Martin Waitz on the git mailing list and is actually the correct thing to do. If the current repository is borrowing objects from repository then this repository is not usually considered to be maintaining the objects which are available through that other repository's object database. We really should only repack objects which are stored directly in this repository, so supply -l to git-repack.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 git-gc.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-gc.sh b/git-gc.sh
index e55ed19..6de55f7 100755
--- a/git-gc.sh
+++ b/git-gc.sh
@@ -10,6 +10,6 @@ SUBDIRECTORY_OK=Yes
 
 git-pack-refs --prune &&
 git-reflog expire --all &&
-git-repack -a -d &&
+git-repack -a -d -l &&
 git-prune &&
 git-rerere gc || exit
-- 
1.4.4.3.gd2e4
Message 1 of 1 in “Teach git-gc to only repack local (not borrowed) objects.”
  1. Teach git-gc to only repack local (not borrowed) objects.Shawn O. Pearce, Dec 27, 2006

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.