git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Alex Henrie <alexhenrie24@gmail.com>,
	git@vger.kernel.org, dstolee@microsoft.com, gitster@pobox.com,
	davvid@gmail.com
Subject: Re: [PATCH 1/3] commit-graph: remove a duplicate assignment
Date: Thu, 26 Sep 2019 09:02:01 -0400	[thread overview]
Message-ID: <8307cccf-e115-c720-6670-2ab537066a01@gmail.com> (raw)
In-Reply-To: <20190925020158.751492-2-alexhenrie24@gmail.com>

On 9/24/2019 10:01 PM, Alex Henrie wrote:
> 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
 


  reply	other threads:[~2019-09-26 13:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25  2:01 [PATCH 0/3] scan-build fixes Alex Henrie
2019-09-25  2:01 ` [PATCH 1/3] commit-graph: remove a duplicate assignment Alex Henrie
2019-09-26 13:02   ` Derrick Stolee [this message]
2019-09-26 18:05     ` Alex Henrie
2019-09-25  2:01 ` [PATCH 2/3] diffcore-break: use a goto instead of a redundant if statement Alex Henrie
2019-09-26 13:12   ` Derrick Stolee
2019-09-25  2:01 ` [PATCH 3/3] wrapper: use a loop instead of repetitive statements Alex Henrie
2019-09-26 13:13   ` Derrick Stolee
2019-09-26 20:14     ` Johannes Schindelin
2019-09-27  2:50       ` Jeff King
2019-09-29  0:51         ` Alex Henrie
2019-09-27  2:45   ` Jeff King
2019-09-27 11:48     ` Derrick Stolee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8307cccf-e115-c720-6670-2ab537066a01@gmail.com \
    --to=stolee@gmail.com \
    --cc=alexhenrie24@gmail.com \
    --cc=davvid@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).