Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'sg/index-pack-progress'
author
Junio C Hamano
<gitster@pobox.com>
Thu, 25 Apr 2019 07:41:15 +0000
(16:41 +0900)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 25 Apr 2019 07:41:15 +0000
(16:41 +0900)
A progress indicator has been added to the "index-pack" step, which
often makes users wait for completion during "git clone".
* sg/index-pack-progress:
index-pack: show progress while checking objects
builtin/index-pack.c
patch
|
blob
|
history
raw
(from parent 1:
a5e4be2
)
diff --git
a/builtin/index-pack.c
b/builtin/index-pack.c
index 31046c7a0a3776fe61e81c30e83f4139e980e1c8..ccf4eb7e9b3361ee7eb209180d98ce8df757d92d 100644
(file)
--- a/
builtin/index-pack.c
+++ b/
builtin/index-pack.c
@@
-219,8
+219,16
@@
static unsigned check_objects(void)
unsigned i, max, foreign_nr = 0;
max = get_max_object_index();
- for (i = 0; i < max; i++)
+
+ if (verbose)
+ progress = start_delayed_progress(_("Checking objects"), max);
+
+ for (i = 0; i < max; i++) {
foreign_nr += check_object(get_indexed_object(i));
+ display_progress(progress, i + 1);
+ }
+
+ stop_progress(&progress);
return foreign_nr;
}