git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH GSoC] repo: Remove unnecessary variable shadow

From
Justin Tobler <jltobler@gmail.com>
Date
Feb 23, 2026, 15:32 UTC
Message-ID
<aZxyju3B4NHp4c_t@denethor>
In-Reply-To
<20260223135248.127935-1-jayatheerthkulkarni2005@gmail.com>
On 26/02/23 07:22PM, K Jayatheerth wrote:
Show 18 quoted lines
> 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
Previous: K JayatheerthNext: JAYATHEERTH K
Message 2 of 4 in “repo: Remove unnecessary variable shadow”
  1. repo: Remove unnecessary variable shadowK Jayatheerth, Feb 23, 2026
  2. Justin ToblerFeb 23, 2026
  3. JAYATHEERTH KFeb 27, 2026
  4. Junio C HamanoFeb 27, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.