diff options
author | Junio C Hamano <junkio@cox.net> | 2006-02-12 13:01:54 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-02-12 13:01:54 -0800 |
commit | 024701f1d88d79f3777bf45c82437f40a80b6eaa (patch) | |
tree | 8f3dc22dc9ad02da1c40bf63c18d6542e1a4b3e6 /pack-objects.c | |
parent | 0dbc4e89bb3ddaaa4230f91d5f59b08f3d33e91b (diff) | |
download | git-024701f1d88d79f3777bf45c82437f40a80b6eaa.tar.gz git-024701f1d88d79f3777bf45c82437f40a80b6eaa.tar.xz |
Make pack-objects chattier.
You could give -q to squelch it, but currently no tool does it.
This would make 'git clone host:repo here' over ssh not silent
again.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'pack-objects.c')
-rw-r--r-- | pack-objects.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pack-objects.c b/pack-objects.c index 2135e9a92..c5a5e6160 100644 --- a/pack-objects.c +++ b/pack-objects.c @@ -5,7 +5,7 @@ #include "csum-file.h" #include <sys/time.h> -static const char pack_usage[] = "git-pack-objects [--non-empty] [--local] [--incremental] [--window=N] [--depth=N] {--stdout | base-name} < object-list"; +static const char pack_usage[] = "git-pack-objects [-q] [--non-empty] [--local] [--incremental] [--window=N] [--depth=N] {--stdout | base-name} < object-list"; struct object_entry { unsigned char sha1[20]; @@ -27,7 +27,7 @@ static struct object_entry *objects = NULL; static int nr_objects = 0, nr_alloc = 0; static const char *base_name; static unsigned char pack_file_sha1[20]; -static int progress = 0; +static int progress = 1; static void *delta_against(void *buf, unsigned long size, struct object_entry *entry) { @@ -520,6 +520,10 @@ int main(int argc, char **argv) usage(pack_usage); continue; } + if (!strcmp("-q", arg)) { + progress = 0; + continue; + } if (!strcmp("--stdout", arg)) { pack_to_stdout = 1; continue; @@ -534,8 +538,6 @@ int main(int argc, char **argv) if (pack_to_stdout != !base_name) usage(pack_usage); - progress = isatty(2); - prepare_packed_git(); if (progress) { fprintf(stderr, "Generating pack...\n"); |