login
Header Space

 
 

[PATCH] Updating documentation to match Brandon Casey's proposed git-repack patch.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: Nicolas Pitre <nico@...>, Brandon Casey <casey@...>, Geert Bosch <bosch@...>, Jeff King <peff@...>, <git@...>
Date: Friday, May 9, 2008 - 7:09 pm

On Fri, May 09, 2008 at 03:33:41PM -0700, Junio C Hamano wrote:

This is what the log history seems to indicate:

	git log -p --grep=keep-unreach

So pack-objects --keep-unreachable was implemented in order to add repack -A,
which now doesn't need --keep-unreachable, and can become obsolete.

Which is just as well, since --keep-unreachable never made it to the
man pages. :-)

If I understand things correctly, there is no user-friendly way to add
loose, unreachable objects to a pack.  This whole architecture was just
to prevent a repack from silently deleting things.

If this is right, the patch below updates the docs.

- Chris


From 443b1201d54f0b7197d18779ce934823e9897b36 Mon Sep 17 00:00:00 2001
From: Chris Frey <cdfrey@foursquare.net>
Date: Fri, 9 May 2008 19:08:26 -0400
Subject: [PATCH] Updating documentation to match Brandon Casey's proposed git-repack patch.

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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: git gc &amp; deleted branches, Brandon Casey, (Thu May 8, 9:41 pm)
Re: git gc &amp; deleted branches, Jeff King, (Fri May 9, 12:19 am)
Re: git gc &amp; deleted branches, Geert Bosch, (Fri May 9, 11:00 am)
Re: git gc &amp; deleted branches, Brandon Casey, (Fri May 9, 11:14 am)
Re: git gc &amp; deleted branches, Nicolas Pitre, (Fri May 9, 12:12 pm)
Re: git gc &amp; deleted branches, Junio C Hamano, (Fri May 9, 6:33 pm)
Re: git gc &amp; deleted branches, Jeremy Maitin-Shepard, (Fri May 9, 8:07 pm)
Re: git gc &amp; deleted branches, Shawn O. Pearce, (Fri May 9, 8:20 pm)
Re: git gc &amp; deleted branches, Junio C Hamano, (Fri May 9, 9:21 pm)
Re: git gc &amp; deleted branches, Jeremy Maitin-Shepard, (Fri May 9, 9:51 pm)
Re: git gc &amp; deleted branches, Jeff King, (Sat May 10, 1:25 am)
Re: git gc &amp; deleted branches, Jeremy Maitin-Shepard, (Sat May 10, 1:36 am)
Re: git gc &amp; deleted branches, Johannes Schindelin, (Sat May 10, 5:04 am)
Re: git gc &amp; deleted branches, Jeremy Maitin-Shepard, (Sat May 10, 12:24 pm)
Re: git gc &amp; deleted branches, Johannes Schindelin, (Sun May 11, 7:11 am)
Re: git gc &amp; deleted branches, Jeremy Maitin-Shepard, (Fri May 9, 8:43 pm)
[PATCH] Updating documentation to match Brandon Casey's prop..., Chris Frey, (Fri May 9, 7:09 pm)
Re: git gc &amp; deleted branches, Brandon Casey, (Fri May 9, 12:54 pm)
Re: git gc &amp; deleted branches, Jeff King, (Fri May 9, 11:53 am)
Re: git gc &amp; deleted branches, Brandon Casey, (Fri May 9, 11:56 am)
Re: git gc &amp; deleted branches, Junio C Hamano, (Thu May 8, 11:21 pm)
speck-geostationary