git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Seyi Kuforiji <kuforiji98@gmail.com>
Cc: git@vger.kernel.org,  Patrick Steinhardt <ps@pks.im>,
	 Phillip Wood <phillip.wood@dunelm.org.uk>,
	 Taylor Blau <me@ttaylorr.com>,
	 Christian Couder <christian.couder@gmail.com>
Subject: Re: [FEATURE] Proposal: git format-patch with `--with-line-numbers` flag
Date: Thu, 21 Aug 2025 12:50:34 -0700	[thread overview]
Message-ID: <xmqqa53s1mk5.fsf@gitster.g> (raw)
In-Reply-To: <CAGedMtf2CW_L8uSc1KRqmAoJ=2Sw4t5AL2AC0uKQJb5keX63ZA@mail.gmail.com> (Seyi Kuforiji's message of "Thu, 21 Aug 2025 13:04:02 +0100")

Seyi Kuforiji <kuforiji98@gmail.com> writes:

>> One things I try in my reviews is, even though I trim my quotes
>> heavily and leave only the part I comment on, I try to leave the
>> filename part (i.e. "diff --git" line) and the hunk header (i.e. "@@
>> -L,K +M,N @@" line) in.  See
>>
>>     https://lore.kernel.org/git/xmqqikla86id.fsf@gitster.g/
>>
>> for an example.
>>
> Ah, thanks for the clarification; that makes sense now. Up until this
> point, I didn't know the hunk headers "(@@ -L,K +M,N @@ lines)"
> provided enough context in terms of the lines the changes were made. I
> just never read them and usually just jump to the reviews on the code
> changes, and I try to locate the changes locally :(. I agree this
> already provides sufficient context, and I've definitely learned
> something new here :). I am wondering if a description of this is
> covered in our documentation. If not, maybe I could add it, since I
> imagine others might have the same question.

I do not think our documentation (documentation proper, not
handholding newbies tutorials) wants to repeat what is in

https://pubs.opengroup.org/onlinepubs/9799919799/utilities/diff.html#tag_20_34_10_07

and explain what different parts of a "patch" output look like, but
perhaps MyFirstContribution would be a good place to add it, if not
done already.

Thanks.



      reply	other threads:[~2025-08-21 19:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 10:08 [FEATURE] Proposal: git format-patch with `--with-line-numbers` flag Seyi Kuforiji
2025-08-18 17:02 ` Junio C Hamano
2025-08-21 12:04   ` Seyi Kuforiji
2025-08-21 19:50     ` 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=xmqqa53s1mk5.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kuforiji98@gmail.com \
    --cc=me@ttaylorr.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=ps@pks.im \
    /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).