git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Christian Couder <christian.couder@gmail.com>
Cc: keita <rudykeita@proton.me>,
	 "git@vger.kernel.org" <git@vger.kernel.org>,
	 "outreachy@gitgitgadget.github.io"
	<outreachy@gitgitgadget.github.io>
Subject: Re: [PATCH] fsck: use starts_with() in fsck_commit()
Date: Sat, 01 Nov 2025 20:58:33 -0700	[thread overview]
Message-ID: <xmqqseexw0eu.fsf@gitster.g> (raw)
In-Reply-To: <CAP8UFD0CqC2tgERkPHuoOPO2ON9NNw_C1R-6UpBXjpgYEM8yxQ@mail.gmail.com> (Christian Couder's message of "Sat, 1 Nov 2025 15:59:43 +0100")

Christian Couder <christian.couder@gmail.com> writes:

> 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.

>>  {
>> - 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.

      reply	other threads:[~2025-11-02  3:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-31 22:00 [PATCH] fsck: use starts_with() in fsck_commit() keita
2025-11-01 14:59 ` Christian Couder
2025-11-02  3:58   ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqseexw0eu.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=outreachy@gitgitgadget.github.io \
    --cc=rudykeita@proton.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).