git-pack-objects progress flag documentation and cleanup
This adds documentation for --progress and --all-progress, remove a duplicate --progress handling and make usage string more readable. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Nicolas Pitre committed
Nov 7, 2006 at 10:51 UTC
231f240b63bd6cb1313e8952448b3d5b9d2fdf26
2 files changed
+27
-9
Documentation/git-pack-objects.txt
+17
@@ -99,6 +99,23 @@ base-name::
99
Only create a packed archive if it would contain at
100
least one object.
101
102
+--progress::
103
+ Progress status is reported on the standard error stream
104
+ by default when it is attached to a terminal, unless -q
105
+ is specified. This flag forces progress status even if
106
+ the standard error stream is not directed to a terminal.
107
+
108
+--all-progress::
109
+ When --stdout is specified then progress report is
110
+ displayed during the object count and deltification phases
111
+ but inhibited during the write-out phase. The reason is
112
+ that in some cases the output stream is directly linked
113
+ to another command which may wish to display progress
114
+ status of its own as it processes incoming pack data.
115
+ This flag is like --progress except that it forces progress
116
+ report for the write-out phase as well even if --stdout is
117
+ used.
118
+
119
-q::
120
This flag makes the command not to report its progress
121
on the standard error stream.
builtin-pack-objects.c
+10
-9
@@ -15,7 +15,12 @@
15
#include <sys/time.h>
16
#include <signal.h>
17
18
-static const char pack_usage[] = "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] <ref-list | <object-list]";
18
+static const char pack_usage[] = "\
19
+git-pack-objects [{ -q | --progress | --all-progress }] \n\
20
+ [--local] [--incremental] [--window=N] [--depth=N] \n\
21
+ [--no-reuse-delta] [--delta-base-offset] [--non-empty] \n\
22
+ [--revs [--unpacked | --all]*] [--stdout | base-name] \n\
23
+ [<ref-list | <object-list]";
24
25
struct object_entry {
26
unsigned char sha1[20];
@@ -1520,14 +1525,6 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
1525
local = 1;
1526
continue;
1527
}
1523
- if (!strcmp("--progress", arg)) {
1524
- progress = 1;
1525
- continue;
1526
- }
1527
- if (!strcmp("--all-progress", arg)) {
1528
- progress = 2;
1529
- continue;
1530
- }
1528
if (!strcmp("--incremental", arg)) {
1529
incremental = 1;
1530
continue;
@@ -1550,6 +1547,10 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
1547
progress = 1;
1548
continue;
1549
}
1550
+ if (!strcmp("--all-progress", arg)) {
1551
+ progress = 2;
1552
+ continue;
1553
+ }
1554
if (!strcmp("-q", arg)) {
1555
progress = 0;
1556
continue;