{"thread":{"id":"64297","subject":"[PATCH] [Outreachy] commit.c: remove leftover comment","startedAt":"2025-10-10T23:34:00Z","lastAt":"2025-10-11T09:21:12Z","messageCount":2,"participants":["Okhuomon Ajayi","Usman Akinyemi"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"528555","messageId":"20251010233303.783212-1-okhuomonajayi54@gmail.com","threadId":"64297","inReplyTo":null,"subject":"[PATCH] [Outreachy] commit.c: remove leftover comment","fromName":"Okhuomon Ajayi","fromEmail":"okhuomonajayi54@gmail.com","sentAt":"2025-10-10T23:33:03Z","receivedAt":"2025-10-10T23:34:00Z","isPatch":true,"sender":{"key":"okhuomonajayi54@gmail.com","avatar":null},"body":"Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>\n---\n commit.c | 7 +++----\n 1 file changed, 3 insertions(+), 4 deletions(-)\n\ndiff --git a/commit.c b/commit.c\nindex 16d91b2bfc..af20ca7c3d 100644\n--- a/commit.c\n+++ b/commit.c\n@@ -475,10 +475,9 @@ int parse_commit_buffer(struct repository *r, struct commit *item, const void *b\n \tif (item->object.parsed)\n \t\treturn 0;\n \t/*\n-\t * Presumably this is leftover from an earlier failed parse;\n-\t * clear it out in preparation for us re-parsing (we'll hit the\n-\t * same error, but that's good, since it lets our caller know\n-\t * the result cannot be trusted.\n+\t * Reset the parent list before re-parsing to ensure a clear\n+\t * commit state. This avoids carrying over data from a previous\n+\t * incomplete or invalid parse.\n \t */\n \tfree_commit_list(item->parents);\n \titem->parents = NULL;\n-- \n2.43.0\n\n"},{"id":"528565","messageId":"CAPSxiM-p_wVTe=a2fYSppcvbXxrOpqC5GotQ-5NYFh57+W8+bg@mail.gmail.com","threadId":"64297","inReplyTo":"20251010233303.783212-1-okhuomonajayi54@gmail.com","subject":"Re: [PATCH] [Outreachy] commit.c: remove leftover comment","fromName":"Usman Akinyemi","fromEmail":"usmanakinyemi202@gmail.com","sentAt":"2025-10-11T09:21:00Z","receivedAt":"2025-10-11T09:21:12Z","isPatch":true,"sender":{"key":"usmanakinyemi202@gmail.com","avatar":"https://avatars.githubusercontent.com/u/86585626?v=4"},"body":"On Sat, Oct 11, 2025 at 5:04 AM Okhuomon Ajayi\n<okhuomonajayi54@gmail.com> wrote:\n>\n> Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>\n> ---\n>  commit.c | 7 +++----\n>  1 file changed, 3 insertions(+), 4 deletions(-)\n>\n> diff --git a/commit.c b/commit.c\n> index 16d91b2bfc..af20ca7c3d 100644\n> --- a/commit.c\n> +++ b/commit.c\n> @@ -475,10 +475,9 @@ int parse_commit_buffer(struct repository *r, struct commit *item, const void *b\n>         if (item->object.parsed)\n>                 return 0;\n>         /*\n> -        * Presumably this is leftover from an earlier failed parse;\n> -        * clear it out in preparation for us re-parsing (we'll hit the\n> -        * same error, but that's good, since it lets our caller know\n> -        * the result cannot be trusted.\n> +        * Reset the parent list before re-parsing to ensure a clear\n> +        * commit state. This avoids carrying over data from a previous\n> +        * incomplete or invalid parse.\n>          */\n>         free_commit_list(item->parents);\n>         item->parents = NULL;\n> --\n> 2.43.0\n>\nIn one of your previous patches, Junio said and I quote:\n\n\"And the proposed commit log message should describe what the problem\nis, why it matters, and how the updated code is better than the\ncurrent state of the code.\"\n\nThis is very important when sending a patch to the Git mailing list.\nYour patches are not complete without it. You can check previous\npatches to see how it is being done by other contributors.\n\n>\n"}]}