public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Justin Tobler <jltobler@gmail.com>
To: K Jayatheerth <jayatheerthkulkarni2005@gmail.com>
Cc: git@vger.kernel.org, Karthik Nayak <karthik.188@gmail.com>,
	 Ayush Chandekar <ayu.chandekar@gmail.com>,
	Siddharth Asthana <siddharthasthana31@gmail.com>,
	 lucasseikioshiro@gmail.com
Subject: Re: [PATCH GSoC] repo: Remove unnecessary variable shadow
Date: Mon, 23 Feb 2026 09:32:36 -0600	[thread overview]
Message-ID: <aZxyju3B4NHp4c_t@denethor> (raw)
In-Reply-To: <20260223135248.127935-1-jayatheerthkulkarni2005@gmail.com>

On 26/02/23 07:22PM, K Jayatheerth wrote:
> Avoid redeclaring `entry` inside the conditional block, removing
> unnecessary variable shadowing and improving code clarity without
> changing behavior.
> 
> Signed-off-by: K Jayatheerth <jayatheerthkulkarni2005@gmail.com>
> ---
>  builtin/repo.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/builtin/repo.c b/builtin/repo.c
> index 0ea045abc1..5540bd25d2 100644
> --- a/builtin/repo.c
> +++ b/builtin/repo.c
> @@ -412,7 +412,6 @@ static void stats_table_print_structure(const struct stats_table *table)
>  		const char *unit = "";
>  
>  		if (entry) {
> -			struct stats_table_entry *entry = item->util;

Yup, this is indeed redundant. Thanks for cleaning up after me.

-Justin

  reply	other threads:[~2026-02-23 15:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 13:52 [PATCH GSoC] repo: Remove unnecessary variable shadow K Jayatheerth
2026-02-23 15:32 ` Justin Tobler [this message]
2026-02-27 17:07 ` JAYATHEERTH K
2026-02-27 19:11   ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=aZxyju3B4NHp4c_t@denethor \
    --to=jltobler@gmail.com \
    --cc=ayu.chandekar@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jayatheerthkulkarni2005@gmail.com \
    --cc=karthik.188@gmail.com \
    --cc=lucasseikioshiro@gmail.com \
    --cc=siddharthasthana31@gmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox