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

Re: [PATCH] fsck: use starts_with() in fsck_commit()

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 2, 2025, 03:58 UTC
Message-ID
<xmqqseexw0eu.fsf@gitster.g>
In-Reply-To
<CAP8UFD0CqC2tgERkPHuoOPO2ON9NNw_C1R-6UpBXjpgYEM8yxQ@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 10 quoted lines
> Hi,
>
> On Fri, Oct 31, 2025 at 11:01 PM keita <rudykeita@proton.me> wrote:
>
>> From 30136adebaffb97edacae2c58c4ea491e39e3f5b Mon Sep 17 00:00:00 2001From: Songiso Cooper Lyambai <rudykeita@proton.me>
>> Date: Fri, 31 Oct 2025 23:45:23 +0200
>> Subject: [PATCH] fsck: use starts_with() in fsck_commit()
>
> If this is related to Outreachy, it would be better to put
> "[Outreachy]" at the start of the subject.

Plus there is a lot more important thing to be said for this part fo the lines that you forgot to point out. They should *NOT* be part of the e-mail body. The Subject: header of the e-mail seems to be set to the same as this line, so the sender only needs to delete all these four lines from the e-mail body and correct the subject.

Show 15 quoted lines
>>  {
>> - struct object_id tree_oid, parent_oid;
>> - unsigned author_count;
>> - int err;
>> - const char *buffer_begin = buffer;
>> - const char *buffer_end = buffer + size;
>> - const char *p;
>> +    struct object_id tree_oid, parent_oid;
>> +    unsigned author_count = 0;
>> +    int err = 0;
>> +    const char *buffer_end = buffer + size;
>> +    const char *p;
>
> Here also I suspect that the indentation changes are not necessary.
> They are also making it ...

Does the preimage even match our code? There is no C code in our codebase that uses a single space indent, so I would not expect these 7 lines of preimage to be found in fsck.c or anywhere in our codebase.

Hence, another more important thing to point out is that the patch would not apply. A suggestion to the author (and other aspiring folks who want to become Git developers) is to

 - Send the patch you are planning to submit, but not to the list
   but only to yourself.
 - Subscribe to the list and then observe the traffic for a day or
   two to find patch e-mails from others.  Find other patch e-mails
   from each of these people at https://lore.kernel.org/git and pick
   the author who is highly regarded.
 - Compare the e-mailed patch you received from yourself, and the
   one you received from the list written by that highly regarded
   author you picked.  I am reasonably sure that they do not have
   the e-mail headers repeated.
 - In your clone of Git, check out an appropriate target; if you are
   fixing something, you want to use a tag that corresponds to a
   released version, if you are proposing a new feature, you want to
   build on the latest released version.  Use "git am" to apply the
   e-mailed patch you received from yourself.

We may want to #leftoverbits add something like the above to the MyFirstContribution document near the part that it teachs to send patches.

> Please make sure you send patches that don't change the indentation
> for no good reason.

A good suggestion that applies much wider than the indentation. Your patch should not do anything related to the theme of the patch, whcih you explained in your proposed log message.

Previous: Christian Couder
Message 3 of 3 in “fsck: use starts_with() in fsck_commit()”
  1. fsck: use starts_with() in fsck_commit()keita, Oct 31, 2025
  2. Christian CouderNov 1, 2025
  3. Junio C HamanoNov 2, 2025

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.