diff options
author | Nicolas Pitre <nico@cam.org> | 2007-10-30 14:57:33 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-10-30 16:08:40 -0700 |
commit | 4d4fcc5451d9d653bebcc8afa18543cb426abeed (patch) | |
tree | 4cf86181f94c46f0c56317132ac42dd403c71674 /builtin-prune-packed.c | |
parent | dc6a0757c4f966dd124bd85be2adad5a0b7b2167 (diff) | |
download | git-4d4fcc5451d9d653bebcc8afa18543cb426abeed.tar.gz |
relax usage of the progress API
Since it is now OK to pass a null pointer to display_progress() and
stop_progress() resulting in a no-op, then we can simplify the code
and remove a bunch of lines by not making those calls conditional all
the time.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-prune-packed.c')
-rw-r--r-- | builtin-prune-packed.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/builtin-prune-packed.c b/builtin-prune-packed.c index c66fb037f6..f4287dad10 100644 --- a/builtin-prune-packed.c +++ b/builtin-prune-packed.c @@ -15,8 +15,7 @@ static void prune_dir(int i, DIR *dir, char *pathname, int len, int opts) struct dirent *de; char hex[40]; - if (opts == VERBOSE) - display_progress(progress, i + 1); + display_progress(progress, i + 1); sprintf(hex, "%02x", i); while ((de = readdir(dir)) != NULL) { @@ -64,8 +63,7 @@ void prune_packed_objects(int opts) prune_dir(i, d, pathname, len + 3, opts); closedir(d); } - if (opts == VERBOSE) - stop_progress(&progress); + stop_progress(&progress); } int cmd_prune_packed(int argc, const char **argv, const char *prefix) |