Merge branch 'ab/commit-graph-progress-fix'
* ab/commit-graph-progress-fix: commit-graph: split up close_reachable() progress output
This commit is contained in:
commit
d4c9027021
@ -638,26 +638,29 @@ static void add_missing_parents(struct packed_oid_list *oids, struct commit *com
|
|||||||
|
|
||||||
static void close_reachable(struct packed_oid_list *oids, int report_progress)
|
static void close_reachable(struct packed_oid_list *oids, int report_progress)
|
||||||
{
|
{
|
||||||
int i;
|
int i, j;
|
||||||
struct commit *commit;
|
struct commit *commit;
|
||||||
struct progress *progress = NULL;
|
struct progress *progress = NULL;
|
||||||
int j = 0;
|
|
||||||
|
|
||||||
if (report_progress)
|
if (report_progress)
|
||||||
progress = start_delayed_progress(
|
progress = start_delayed_progress(
|
||||||
_("Annotating commits in commit graph"), 0);
|
_("Loading known commits in commit graph"), j = 0);
|
||||||
for (i = 0; i < oids->nr; i++) {
|
for (i = 0; i < oids->nr; i++) {
|
||||||
display_progress(progress, ++j);
|
display_progress(progress, ++j);
|
||||||
commit = lookup_commit(the_repository, &oids->list[i]);
|
commit = lookup_commit(the_repository, &oids->list[i]);
|
||||||
if (commit)
|
if (commit)
|
||||||
commit->object.flags |= UNINTERESTING;
|
commit->object.flags |= UNINTERESTING;
|
||||||
}
|
}
|
||||||
|
stop_progress(&progress);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* As this loop runs, oids->nr may grow, but not more
|
* As this loop runs, oids->nr may grow, but not more
|
||||||
* than the number of missing commits in the reachable
|
* than the number of missing commits in the reachable
|
||||||
* closure.
|
* closure.
|
||||||
*/
|
*/
|
||||||
|
if (report_progress)
|
||||||
|
progress = start_delayed_progress(
|
||||||
|
_("Expanding reachable commits in commit graph"), j = 0);
|
||||||
for (i = 0; i < oids->nr; i++) {
|
for (i = 0; i < oids->nr; i++) {
|
||||||
display_progress(progress, ++j);
|
display_progress(progress, ++j);
|
||||||
commit = lookup_commit(the_repository, &oids->list[i]);
|
commit = lookup_commit(the_repository, &oids->list[i]);
|
||||||
@ -665,7 +668,11 @@ static void close_reachable(struct packed_oid_list *oids, int report_progress)
|
|||||||
if (commit && !parse_commit(commit))
|
if (commit && !parse_commit(commit))
|
||||||
add_missing_parents(oids, commit);
|
add_missing_parents(oids, commit);
|
||||||
}
|
}
|
||||||
|
stop_progress(&progress);
|
||||||
|
|
||||||
|
if (report_progress)
|
||||||
|
progress = start_delayed_progress(
|
||||||
|
_("Clearing commit marks in commit graph"), j = 0);
|
||||||
for (i = 0; i < oids->nr; i++) {
|
for (i = 0; i < oids->nr; i++) {
|
||||||
display_progress(progress, ++j);
|
display_progress(progress, ++j);
|
||||||
commit = lookup_commit(the_repository, &oids->list[i]);
|
commit = lookup_commit(the_repository, &oids->list[i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user