git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Teach git-gc to only repack local (not borrowed) objects.
@ 2006-12-27 23:47 Shawn O. Pearce
  0 siblings, 0 replies; only message in thread
From: Shawn O. Pearce @ 2006-12-27 23:47 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-12-27 23:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-27 23:47 [PATCH] Teach git-gc to only repack local (not borrowed) objects Shawn O. Pearce

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).