diff options
author | Nicolas Pitre <nico@cam.org> | 2007-11-08 21:45:41 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-09 00:43:41 +0100 |
commit | a984a06a07cdd0a843eb6107ad56e346d99ac840 (patch) | |
tree | becc999b97530e57e9fa3941914f8473a8d67b24 /index-pack.c | |
parent | make display of total transferred fully accurate (diff) | |
download | git-a984a06a07cdd0a843eb6107ad56e346d99ac840.tar.xz git-a984a06a07cdd0a843eb6107ad56e346d99ac840.zip |
nicer display of thin pack completion
In the same spirit of prettifying Git's output display for mere mortals,
here's a simple extension to the progress API allowing for a final
message to be provided when terminating a progress line, and use it for
the display of the number of objects needed to complete a thin pack,
saving yet one more line of screen display.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'index-pack.c')
-rw-r--r-- | index-pack.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/index-pack.c b/index-pack.c index 581a7f5650..469a3307dc 100644 --- a/index-pack.c +++ b/index-pack.c @@ -792,6 +792,7 @@ int main(int argc, char **argv) flush(); } else { if (fix_thin_pack) { + char msg[48]; int nr_unresolved = nr_deltas - nr_resolved_deltas; int nr_objects_initial = nr_objects; if (nr_unresolved <= 0) @@ -800,12 +801,11 @@ int main(int argc, char **argv) (nr_objects + nr_unresolved + 1) * sizeof(*objects)); fix_unresolved_deltas(nr_unresolved); - stop_progress(&progress); - if (verbose) - fprintf(stderr, "%d objects were added to complete this thin pack.\n", - nr_objects - nr_objects_initial); + sprintf(msg, "completed with %d local objects", + nr_objects - nr_objects_initial); + stop_progress_msg(&progress, msg); fixup_pack_header_footer(output_fd, sha1, - curr_pack, nr_objects); + curr_pack, nr_objects); } if (nr_deltas != nr_resolved_deltas) die("pack has %d unresolved deltas", |