git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC] pack-objects documentation and usage update
@ 2008-01-22  8:03 Johannes Sixt
  0 siblings, 0 replies; only message in thread
From: Johannes Sixt @ 2008-01-22  8:03 UTC (permalink / raw)
  To: Git Mailing List

With the previous ordering in the short usage help it was difficult to
spot that either a base-name or --stdout must be specified. Some
punctuation is dropped because it is more hindrance than help.

The documentation of --reflog is added and the synopsis updated to include
all options that pack-objects understands.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
Since this patch does not fill in the missing documentation of
--keep-unreachable, I marked it as RFC.

08cdfb13374 says about --keep-unreachable:

    This new option is meant to be used in conjunction with the
    options "git repack -a -d" usually invokes the underlying
    pack-objects with.  When this option is given, objects unreachable
    from the refs in packs named with --unpacked= option are added
    to the resulting pack, in addition to the reachable objects that
    are not in packs marked with *.keep files.

but this sentence is too complicated for my small brain.

-- Hannes

 Documentation/git-pack-objects.txt |   15 ++++++++++++---
 builtin-pack-objects.c             |    4 ++--
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index 74cc7c1..6a3ddc9 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -9,9 +9,13 @@ git-pack-objects - Create a packed archive of objects
 SYNOPSIS
 --------
 [verse]
-'git-pack-objects' [-q] [--no-reuse-delta] [--delta-base-offset] [--non-empty]
-	[--local] [--incremental] [--window=N] [--depth=N] [--all-progress]
-	[--revs [--unpacked | --all]*] [--stdout | base-name] < object-list
+'git-pack-objects' [-q | --progress | --all-progress]
+        [--max-pack-size=N] [--local] [--incremental]
+        [--window=N] [--window-memory=N] [--depth=N]
+        [--no-reuse-delta] [--no-reuse-object] [--delta-base-offset]
+        [--threads=N] [--non-empty] [--revs [--unpacked | --all]*] [--reflog]
+        [--keep-unreachable] --stdout | base-name < ref-or-object-list
+


 DESCRIPTION
@@ -73,6 +77,11 @@ base-name::
 	as if all refs under `$GIT_DIR/refs` are specified to be
 	included.

+--reflog::
+	This implies `--revs`. In addition to the objects reachable
+	from the revision arguments, pack also those objects that
+	are reachable from those revisions' reflogs.
+
 --window=[N], --depth=[N]::
 	These two options affect how the objects contained in
 	the pack are stored using delta compression.  The
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index ec10238..cd7a272 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -20,12 +20,12 @@
 #endif

 static const char pack_usage[] = "\
-git-pack-objects [{ -q | --progress | --all-progress }] \n\
+git-pack-objects [-q | --progress | --all-progress] \n\
 	[--max-pack-size=N] [--local] [--incremental] \n\
 	[--window=N] [--window-memory=N] [--depth=N] \n\
 	[--no-reuse-delta] [--no-reuse-object] [--delta-base-offset] \n\
 	[--threads=N] [--non-empty] [--revs [--unpacked | --all]*] [--reflog] \n\
-	[--stdout | base-name] [--keep-unreachable] [<ref-list | <object-list]";
+	[--keep-unreachable] --stdout | base-name < ref-or-object-list";

 struct object_entry {
 	struct pack_idx_entry idx;
-- 
1.5.4.rc3.24.g25a9a

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

only message in thread, other threads:[~2008-01-22  8:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-22  8:03 [PATCH/RFC] pack-objects documentation and usage update Johannes Sixt

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).