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

Re: [PATCH V2] patch-id: fix scan_hunk_header on diffs with 1 line of before/after

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 31, 2022, 18:55 UTC
Message-ID
<xmqqleyvivks.fsf@gitster.g>
In-Reply-To
<20220129024757.24763-1-jerry@skydio.com>
Jerry Zhang <jerry@skydio.com> writes:
> Normally diffs will contain a hunk header of the format
> "@@ -2,2 +2,15 @@ code". However in certain situations git can
> omit the second comma separated value in either before or after
> line counts in the case where there is only one line.

No need to resend, but this is specific enough (i.e. ",1" is omitted) and "in certain situations" makes it needlessly fuzzy, making readers wonder if there are any other cases. Also, this is not "git can omit". The "unified context" format output from any "diff" command share this special case.

Otherwise looking very good.
Thanks for a fix.  Will queue.
Previous: Jerry ZhangNext: Junio C Hamano
Message 4 of 6 in “patch-id: fix scan_hunk_header on diffs with -U1”
  1. patch-id: fix scan_hunk_header on diffs with -U1Jerry Zhang, Jan 25, 2022
  2. Junio C HamanoJan 26, 2022
  3. patch-id: fix scan_hunk_header on diffs with 1 line of before/afterJerry Zhang, Jan 29, 2022
  4. Junio C HamanoJan 31, 2022
  5. Junio C HamanoJan 31, 2022
  6. Junio C HamanoJan 31, 2022

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.