Re: [PATCH 1/3] commit-graph: remove a duplicate assignment
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Sep 26, 2019, 13:02 UTC
- Message-ID
- <8307cccf-e115-c720-6670-2ab537066a01@gmail.com>
- In-Reply-To
- <20190925020158.751492-2-alexhenrie24@gmail.com>
On 9/24/2019 10:01 PM, Alex Henrie wrote:
Show 17 quoted lines
> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> > --- > commit-graph.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/commit-graph.c b/commit-graph.c > index 9b02d2c426..659f4bb4f4 100644 > --- a/commit-graph.c > +++ b/commit-graph.c > @@ -1534,7 +1534,6 @@ static void split_graph_merge_strategy(struct write_commit_graph_context *ctx) > size_mult = ctx->split_opts->size_multiple; > } > > - g = ctx->r->objects->commit_graph; > ctx->num_commit_graphs_after = ctx->num_commit_graphs_before + 1; > > while (g && (g->num_commits <= size_mult * num_commits ||
Could we instead remove the assignment during the declaration? It is easier to know the while loop will work if the assignment is closer to the loop.
Thanks, -Stolee