[PATCH/RFC] pack-objects documentation and usage update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
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


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux