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>
This commit is contained in:

committed by
Shawn O. Pearce

parent
207f1a75e7
commit
42e18fbf5f
@ -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();
|
||||
|
Reference in New Issue
Block a user