summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-04-20 18:10:07 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-04-23 05:18:05 (GMT)
commit13aaf148258808437c485d3ef54c7ae7668384d7 (patch)
tree17f2ec24d48906b44948b3091129688ea402f9f7 /builtin-pack-objects.c
parent96a02f8f6d2192d3686cd1c719044082c89e8391 (diff)
downloadgit-13aaf148258808437c485d3ef54c7ae7668384d7.zip
git-13aaf148258808437c485d3ef54c7ae7668384d7.tar.gz
git-13aaf148258808437c485d3ef54c7ae7668384d7.tar.bz2
make progress "title" part of the common progress interface
If the progress bar ends up in a box, better provide a title for it too. 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, 7 insertions, 12 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index d7d9996..b827627 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -580,10 +580,8 @@ static off_t write_pack_file(void)
f = sha1fd(fd, pack_tmp_name);
}
- if (do_progress) {
- fprintf(stderr, "Writing %u objects.\n", nr_result);
- start_progress(&progress_state, "", nr_result);
- }
+ if (do_progress)
+ start_progress(&progress_state, "Writing %u objects...", "", nr_result);
hdr.hdr_signature = htonl(PACK_SIGNATURE);
hdr.hdr_version = htonl(PACK_VERSION);
@@ -1389,10 +1387,8 @@ static void find_deltas(struct object_entry **list, int window, int depth)
return;
array = xmalloc(array_size);
memset(array, 0, array_size);
- if (progress) {
- fprintf(stderr, "Deltifying %u objects.\n", nr_result);
- start_progress(&progress_state, "", nr_result);
- }
+ if (progress)
+ start_progress(&progress_state, "Deltifying %u objects...", "", nr_result);
do {
struct object_entry *entry = list[--i];
@@ -1722,10 +1718,9 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
prepare_packed_git();
- if (progress) {
- fprintf(stderr, "Generating pack...\n");
- start_progress(&progress_state, "Counting objects: ", 0);
- }
+ if (progress)
+ start_progress(&progress_state, "Generating pack...",
+ "Counting objects: ", 0);
if (!use_internal_rev_list)
read_object_list_from_stdin();
else {