* [PATCH GSoC] repo: Remove unnecessary variable shadow
@ 2026-02-23 13:52 K Jayatheerth
2026-02-23 15:32 ` Justin Tobler
2026-02-27 17:07 ` JAYATHEERTH K
0 siblings, 2 replies; 4+ messages in thread
From: K Jayatheerth @ 2026-02-23 13:52 UTC (permalink / raw)
To: git
Cc: Karthik Nayak, Justin Tobler, Ayush Chandekar, Siddharth Asthana,
lucasseikioshiro, K Jayatheerth
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;
value = entry->value;
if (entry->unit)
unit = entry->unit;
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH GSoC] repo: Remove unnecessary variable shadow
2026-02-23 13:52 [PATCH GSoC] repo: Remove unnecessary variable shadow K Jayatheerth
@ 2026-02-23 15:32 ` Justin Tobler
2026-02-27 17:07 ` JAYATHEERTH K
1 sibling, 0 replies; 4+ messages in thread
From: Justin Tobler @ 2026-02-23 15:32 UTC (permalink / raw)
To: K Jayatheerth
Cc: git, Karthik Nayak, Ayush Chandekar, Siddharth Asthana,
lucasseikioshiro
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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH GSoC] repo: Remove unnecessary variable shadow
2026-02-23 13:52 [PATCH GSoC] repo: Remove unnecessary variable shadow K Jayatheerth
2026-02-23 15:32 ` Justin Tobler
@ 2026-02-27 17:07 ` JAYATHEERTH K
2026-02-27 19:11 ` Junio C Hamano
1 sibling, 1 reply; 4+ messages in thread
From: JAYATHEERTH K @ 2026-02-27 17:07 UTC (permalink / raw)
To: git
Cc: Karthik Nayak, Justin Tobler, Ayush Chandekar, Siddharth Asthana,
lucasseikioshiro, Junio C Hamano
Hey Junio,
I got a review on this patch,
if no one has an issue I wanted to remind it for the next cycle.
Regards
- Jayatheerth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH GSoC] repo: Remove unnecessary variable shadow
2026-02-27 17:07 ` JAYATHEERTH K
@ 2026-02-27 19:11 ` Junio C Hamano
0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2026-02-27 19:11 UTC (permalink / raw)
To: JAYATHEERTH K
Cc: git, Karthik Nayak, Justin Tobler, Ayush Chandekar,
Siddharth Asthana, lucasseikioshiro
JAYATHEERTH K <jayatheerthkulkarni2005@gmail.com> writes:
> I got a review on this patch,
> if no one has an issue I wanted to remind it for the next cycle.
Thanks.
An easier way to ping is to resubmit exactly the same patch, with
reviewed-by: or acked-by: trailer crediting the reviewer. We have
2000+ messages in 4 weeks, so "I got a review on this patch" without
a pointer is much less useful to verify what feedback came to the
thread from whom. FYI here are from the headers of the message I am
responding to.
References: <20260223135248.127935-1-jayatheerthkulkarni2005@gmail.com>
Message-ID: <CA+rGoLeppg4Xaoqg6+SZ=ET=ze6rXUbmjLm5UvmitmRGm9u6ag@mail.gmail.com>
The reference points at the patch itself, and just like Git commits
do not have pointers to their children, the original patch message
has no links to reviews on it X-<.
I'll commit this with the following change now.
Thanks.
1: 006c49ee01 ! 1: a66c8c7f91 repo: Remove unnecessary variable shadow
@@ Metadata
Author: K Jayatheerth <jayatheerthkulkarni2005@gmail.com>
## Commit message ##
- repo: Remove unnecessary variable shadow
+ repo: remove unnecessary variable shadow
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>
+ Acked-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
## builtin/repo.c ##
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-02-27 19:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-23 13:52 [PATCH GSoC] repo: Remove unnecessary variable shadow K Jayatheerth
2026-02-23 15:32 ` Justin Tobler
2026-02-27 17:07 ` JAYATHEERTH K
2026-02-27 19:11 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox