summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-10-17 01:55:45 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-10-17 06:54:55 (GMT)
commit42e18fbf5f94dd6bd303bf702e030a29fa39d6c4 (patch)
tree5ecf0327f3b5a99e0fc37709aef674d56d825638 /builtin-pack-objects.c
parent207f1a75e7e4d14286aeed107af7c56dc811797b (diff)
downloadgit-42e18fbf5f94dd6bd303bf702e030a29fa39d6c4.zip
git-42e18fbf5f94dd6bd303bf702e030a29fa39d6c4.tar.gz
git-42e18fbf5f94dd6bd303bf702e030a29fa39d6c4.tar.bz2
more compact progress display
Each progress can be on a single line instead of two. [sp: Changed "Checking files out" to "Checking out files" at Johannes Sixt's suggestion as it better explains the action that is taking place] Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 0be539e..df69abd 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -606,7 +606,7 @@ static void write_pack_file(void)
uint32_t nr_remaining = nr_result;
if (do_progress)
- start_progress(&progress_state, "Writing %u objects...", "", nr_result);
+ start_progress(&progress_state, "Writing objects", nr_result);
written_list = xmalloc(nr_objects * sizeof(struct object_entry *));
do {
@@ -1717,9 +1717,8 @@ static void prepare_pack(int window, int depth)
if (nr_deltas) {
unsigned nr_done = 0;
if (progress)
- start_progress(&progress_state,
- "Deltifying %u objects...", "",
- nr_deltas);
+ start_progress(&progress_state, "Deltifying objects",
+ nr_deltas);
qsort(delta_list, n, sizeof(*delta_list), type_size_sort);
ll_find_deltas(delta_list, n, window+1, depth, &nr_done);
if (progress)
@@ -2135,23 +2134,18 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
prepare_packed_git();
if (progress)
- start_progress(&progress_state, "Generating pack...",
- "Counting objects: ", 0);
+ start_progress(&progress_state, "Counting objects", 0);
if (!use_internal_rev_list)
read_object_list_from_stdin();
else {
rp_av[rp_ac] = NULL;
get_object_list(rp_ac, rp_av);
}
- if (progress) {
+ if (progress)
stop_progress(&progress_state);
- fprintf(stderr, "Done counting %u objects.\n", nr_objects);
- }
if (non_empty && !nr_result)
return 0;
- if (progress && (nr_objects != nr_result))
- fprintf(stderr, "Result has %u objects.\n", nr_result);
if (nr_result)
prepare_pack(window, depth);
write_pack_file();