Merge branch 'rs/commit-graph-code-simplification'
Code simplfication. * rs/commit-graph-code-simplification: commit-graph: use progress title directlymaint
commit
5da7329e29
|
@ -1657,19 +1657,15 @@ static void merge_commit_graphs(struct write_commit_graph_context *ctx)
|
||||||
{
|
{
|
||||||
struct commit_graph *g = ctx->r->objects->commit_graph;
|
struct commit_graph *g = ctx->r->objects->commit_graph;
|
||||||
uint32_t current_graph_number = ctx->num_commit_graphs_before;
|
uint32_t current_graph_number = ctx->num_commit_graphs_before;
|
||||||
struct strbuf progress_title = STRBUF_INIT;
|
|
||||||
|
|
||||||
while (g && current_graph_number >= ctx->num_commit_graphs_after) {
|
while (g && current_graph_number >= ctx->num_commit_graphs_after) {
|
||||||
current_graph_number--;
|
current_graph_number--;
|
||||||
|
|
||||||
if (ctx->report_progress) {
|
if (ctx->report_progress)
|
||||||
strbuf_addstr(&progress_title, _("Merging commit-graph"));
|
ctx->progress = start_delayed_progress(_("Merging commit-graph"), 0);
|
||||||
ctx->progress = start_delayed_progress(progress_title.buf, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
merge_commit_graph(ctx, g);
|
merge_commit_graph(ctx, g);
|
||||||
stop_progress(&ctx->progress);
|
stop_progress(&ctx->progress);
|
||||||
strbuf_release(&progress_title);
|
|
||||||
|
|
||||||
g = g->base_graph;
|
g = g->base_graph;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue