Git development
 help / color / mirror / Atom feed
* [PATCH] Updating documentation to match Brandon Casey's proposed git-repack patch.
@ 2008-05-14  7:25 Chris Frey
  2008-05-14  8:26 ` Johannes Schindelin
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Frey @ 2008-05-14  7:25 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

I haven't heard any negative commentary on this patch, and I see
the repack patch is in next, so resending in case it was missed.

This patch clarifies the git-prune man page, documenting that it only
prunes unpacked objects.  git-repack is documented according to
the new git-repack -A behaviour, which does not depend on
git-pack-objects --keep-unreachable anymore.

Signed-off-by: Chris Frey <cdfrey@foursquare.net>
---
 Documentation/git-prune.txt  |    5 ++++-
 Documentation/git-repack.txt |   14 +++++++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-prune.txt b/Documentation/git-prune.txt
index f92bb8c..3178bc4 100644
--- a/Documentation/git-prune.txt
+++ b/Documentation/git-prune.txt
@@ -18,12 +18,15 @@ git-prune. See the section "NOTES", below.
 
 This runs `git-fsck --unreachable` using all the refs
 available in `$GIT_DIR/refs`, optionally with additional set of
-objects specified on the command line, and prunes all
+objects specified on the command line, and prunes all unpacked
 objects unreachable from any of these head objects from the object database.
 In addition, it
 prunes the unpacked objects that are also found in packs by
 running `git prune-packed`.
 
+Note that unreachable, packed objects will remain.  If this is
+not desired, see linkgit:git-repack[1].
+
 OPTIONS
 -------
 
diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
index 3d95749..906d3c7 100644
--- a/Documentation/git-repack.txt
+++ b/Documentation/git-repack.txt
@@ -8,7 +8,7 @@ git-repack - Pack unpacked objects in a repository
 
 SYNOPSIS
 --------
-'git-repack' [-a] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N]
+'git-repack' [-a] [-A] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N]
 
 DESCRIPTION
 -----------
@@ -37,6 +37,18 @@ OPTIONS
 	leaves behind, but `git fsck --full` shows as
 	dangling.
 
+-A::
+	Same as `-a`, but any unreachable objects in a previous
+	pack become loose, unpacked objects, instead of being
+	left in the old pack.  Unreachable objects are never
+	intentionally added to a pack, even when repacking.
+	When used with '-d', this option
+	prevents unreachable objects from being immediately
+	deleted by way of being left in the old pack and then
+	removed.  Instead, the loose unreachable objects
+	will be pruned according to normal expiry rules
+	with the next linkgit:git-gc[1].
+
 -d::
 	After packing, if the newly created packs make some
 	existing packs redundant, remove the redundant packs.
-- 
1.5.4.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* Re: git gc & deleted branches
@ 2008-05-08 21:40 Brandon Casey
  2008-05-08 21:44 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Brandon Casey @ 2008-05-08 21:40 UTC (permalink / raw)
  To: Jeff King; +Cc: Nicolas Pitre, Guido Ostkamp, git

Jeff King wrote:
> On Thu, May 08, 2008 at 04:23:53PM -0500, Brandon Casey wrote:
> 
>>> I thought that -A would eventually put them all into a single pack,
>>> killing off the old packs.
>> '-a' puts everything in a single pack and kills off old packs. Anything that
>> was unreachable is not repacked in the new pack.
>>
>> '-A' does the same thing but it also repacks the unreachable objects that were
>> previously packed.
> 
> Ah, indeed. I hadn't looked closely at the -A behavior before. So yes,
> we are never killing off prunable packed objects. Probably we could use
> the same solution as "git prune --expire"; perhaps a
> "--keep-unreachable=2.weeks.ago"?

The 'prune --expire' behavior is based on object mtime (i.e. file modification time).
That is lost once something is packed right?

I was thinking that either repack or pack-objects could be modified to unpack those
unreachable objects and leave them loose, and also give them the timestamp of the
pack file they came from. Then the --expire behavior of git-prune could work normally
and remove them. This seems like it would work nicely since prune follows repack in
git-gc.

-brandon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-14  8:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-14  7:25 [PATCH] Updating documentation to match Brandon Casey's proposed git-repack patch Chris Frey
2008-05-14  8:26 ` Johannes Schindelin
  -- strict thread matches above, loose matches on Subject: below --
2008-05-08 21:40 git gc & deleted branches Brandon Casey
2008-05-08 21:44 ` Jeff King
2008-05-08 21:53   ` Brandon Casey
2008-05-08 22:48     ` Jeff King
2008-05-09  1:41       ` Brandon Casey
2008-05-09  4:19         ` Jeff King
2008-05-09 15:00           ` Geert Bosch
2008-05-09 15:14             ` Brandon Casey
2008-05-09 16:12               ` Nicolas Pitre
2008-05-09 22:33                 ` Junio C Hamano
2008-05-09 23:09                   ` [PATCH] Updating documentation to match Brandon Casey's proposed git-repack patch Chris Frey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox