Subject: Re: [PATCH 1/3] commit-graph: remove a duplicate assignment

From: Derrick Stolee <[email-masked]>
Date: Thu, 26 Sep 2019 09:02:01 -0400

On 9/24/2019 10:01 PM, Alex Henrie wrote:
> Signed-off-by: Alex Henrie <[email-masked]>
> ---
>  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