summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2006-11-07 10:51:23 -0500
committerJunio C Hamano <junkio@cox.net>2006-11-07 16:05:37 -0800
commit231f240b63bd6cb1313e8952448b3d5b9d2fdf26 (patch)
tree995f31ed613e5ca4ec60c28be22e9c41db457dc4 /builtin-pack-objects.c
parentd0a75a179e0e872c47d4a25350565a8c7c04dd0b (diff)
downloadgit-231f240b63bd6cb1313e8952448b3d5b9d2fdf26.tar.gz
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>
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 270bcbded6..69e5dd39ca 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -15,7 +15,12 @@
#include <sys/time.h>
#include <signal.h>
-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]";
+static const char pack_usage[] = "\
+git-pack-objects [{ -q | --progress | --all-progress }] \n\
+ [--local] [--incremental] [--window=N] [--depth=N] \n\
+ [--no-reuse-delta] [--delta-base-offset] [--non-empty] \n\
+ [--revs [--unpacked | --all]*] [--stdout | base-name] \n\
+ [<ref-list | <object-list]";
struct object_entry {
unsigned char sha1[20];
@@ -1520,14 +1525,6 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
local = 1;
continue;
}
- if (!strcmp("--progress", arg)) {
- progress = 1;
- continue;
- }
- if (!strcmp("--all-progress", arg)) {
- progress = 2;
- continue;
- }
if (!strcmp("--incremental", arg)) {
incremental = 1;
continue;
@@ -1550,6 +1547,10 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
progress = 1;
continue;
}
+ if (!strcmp("--all-progress", arg)) {
+ progress = 2;
+ continue;
+ }
if (!strcmp("-q", arg)) {
progress = 0;
continue;