{"thread":{"id":"65056","subject":"[PATCH GSoC] repo: Remove unnecessary variable shadow","startedAt":"2026-02-23T13:53:49Z","lastAt":"2026-02-27T19:11:23Z","messageCount":4,"participants":["K Jayatheerth","Justin Tobler","JAYATHEERTH K","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"536792","messageId":"20260223135248.127935-1-jayatheerthkulkarni2005@gmail.com","threadId":"65056","inReplyTo":null,"subject":"[PATCH GSoC] repo: Remove unnecessary variable shadow","fromName":"K Jayatheerth","fromEmail":"jayatheerthkulkarni2005@gmail.com","sentAt":"2026-02-23T13:52:48Z","receivedAt":"2026-02-23T13:53:49Z","isPatch":true,"sender":{"key":"jayatheerthkulkarni2005@gmail.com","avatar":"https://avatars.githubusercontent.com/u/148841023?v=4"},"body":"Avoid redeclaring `entry` inside the conditional block, removing\nunnecessary variable shadowing and improving code clarity without\nchanging behavior.\n\nSigned-off-by: K Jayatheerth <jayatheerthkulkarni2005@gmail.com>\n---\n builtin/repo.c | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/builtin/repo.c b/builtin/repo.c\nindex 0ea045abc1..5540bd25d2 100644\n--- a/builtin/repo.c\n+++ b/builtin/repo.c\n@@ -412,7 +412,6 @@ static void stats_table_print_structure(const struct stats_table *table)\n \t\tconst char *unit = \"\";\n \n \t\tif (entry) {\n-\t\t\tstruct stats_table_entry *entry = item->util;\n \t\t\tvalue = entry->value;\n \t\t\tif (entry->unit)\n \t\t\t\tunit = entry->unit;\n-- \n2.53.0\n\n"},{"id":"536811","messageId":"aZxyju3B4NHp4c_t@denethor","threadId":"65056","inReplyTo":"20260223135248.127935-1-jayatheerthkulkarni2005@gmail.com","subject":"Re: [PATCH GSoC] repo: Remove unnecessary variable shadow","fromName":"Justin Tobler","fromEmail":"jltobler@gmail.com","sentAt":"2026-02-23T15:32:36Z","receivedAt":"2026-02-23T15:32:38Z","isPatch":true,"sender":{"key":"jltobler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/53454972?v=4"},"body":"On 26/02/23 07:22PM, K Jayatheerth wrote:\n> Avoid redeclaring `entry` inside the conditional block, removing\n> unnecessary variable shadowing and improving code clarity without\n> changing behavior.\n> \n> Signed-off-by: K Jayatheerth <jayatheerthkulkarni2005@gmail.com>\n> ---\n>  builtin/repo.c | 1 -\n>  1 file changed, 1 deletion(-)\n> \n> diff --git a/builtin/repo.c b/builtin/repo.c\n> index 0ea045abc1..5540bd25d2 100644\n> --- a/builtin/repo.c\n> +++ b/builtin/repo.c\n> @@ -412,7 +412,6 @@ static void stats_table_print_structure(const struct stats_table *table)\n>  \t\tconst char *unit = \"\";\n>  \n>  \t\tif (entry) {\n> -\t\t\tstruct stats_table_entry *entry = item->util;\n\nYup, this is indeed redundant. Thanks for cleaning up after me.\n\n-Justin\n"},{"id":"537307","messageId":"CA+rGoLeppg4Xaoqg6+SZ=ET=ze6rXUbmjLm5UvmitmRGm9u6ag@mail.gmail.com","threadId":"65056","inReplyTo":"20260223135248.127935-1-jayatheerthkulkarni2005@gmail.com","subject":"Re: [PATCH GSoC] repo: Remove unnecessary variable shadow","fromName":"JAYATHEERTH K","fromEmail":"jayatheerthkulkarni2005@gmail.com","sentAt":"2026-02-27T17:07:45Z","receivedAt":"2026-02-27T17:07:58Z","isPatch":true,"sender":{"key":"jayatheerthkulkarni2005@gmail.com","avatar":"https://avatars.githubusercontent.com/u/148841023?v=4"},"body":"Hey Junio,\n\nI got a review on this patch,\nif no one has an issue I wanted to remind it for the next cycle.\n\nRegards\n- Jayatheerth\n"},{"id":"537320","messageId":"xmqq1pi6q9wm.fsf@gitster.g","threadId":"65056","inReplyTo":"CA+rGoLeppg4Xaoqg6+SZ=ET=ze6rXUbmjLm5UvmitmRGm9u6ag@mail.gmail.com","subject":"Re: [PATCH GSoC] repo: Remove unnecessary variable shadow","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-02-27T19:11:21Z","receivedAt":"2026-02-27T19:11:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"JAYATHEERTH K <jayatheerthkulkarni2005@gmail.com> writes:\n\n> I got a review on this patch,\n> if no one has an issue I wanted to remind it for the next cycle.\n\nThanks.\n\nAn easier way to ping is to resubmit exactly the same patch, with\nreviewed-by: or acked-by: trailer crediting the reviewer.  We have\n2000+ messages in 4 weeks, so \"I got a review on this patch\" without\na pointer is much less useful to verify what feedback came to the\nthread from whom.  FYI here are from the headers of the message I am\nresponding to.\n\n    References: <20260223135248.127935-1-jayatheerthkulkarni2005@gmail.com>\n    Message-ID: <CA+rGoLeppg4Xaoqg6+SZ=ET=ze6rXUbmjLm5UvmitmRGm9u6ag@mail.gmail.com>\n\nThe reference points at the patch itself, and just like Git commits\ndo not have pointers to their children, the original patch message\nhas no links to reviews on it X-<.\n\nI'll commit this with the following change now.\n\nThanks.\n\n1:  006c49ee01 ! 1:  a66c8c7f91 repo: Remove unnecessary variable shadow\n    @@ Metadata\n     Author: K Jayatheerth <jayatheerthkulkarni2005@gmail.com>\n     \n      ## Commit message ##\n    -    repo: Remove unnecessary variable shadow\n    +    repo: remove unnecessary variable shadow\n     \n         Avoid redeclaring `entry` inside the conditional block, removing\n         unnecessary variable shadowing and improving code clarity without\n         changing behavior.\n     \n         Signed-off-by: K Jayatheerth <jayatheerthkulkarni2005@gmail.com>\n    +    Acked-by: Justin Tobler <jltobler@gmail.com>\n         Signed-off-by: Junio C Hamano <gitster@pobox.com>\n     \n      ## builtin/repo.c ##\n\n\n"}]}