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

Re: [PATCH v2 2/2] t: use commit_body to extract commit message bodies

From
Shlok Kulshreshtha <diy2903@gmail.com>
Date
Jul 30, 2026, 18:02 UTC
Message-ID
<20260730180207.83197-1-diy2903@gmail.com>
In-Reply-To
<xmqqpl05o5n7.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
> I would not claim to have checked all of these changes, but I did
> spot check a handful and they all looked reasonable.
>
> Shall we mark the topic for 'next'?
Yes, please.

To save you reading all 66 hunks: 63 of them are the same local swap, where the rev and the output file are unchanged and only the spelling differs.

	-git cat-file commit HEAD | sed -e "1,/^\$/d" >actual
	+commit_body HEAD >actual
Each one can be confirmed by looking at the hunk alone.
The three hunks that are worth actual attention are:
* t7509-commit-authorship.sh, the hunk at author_header().  This one
  deletes the file's local message_body() helper rather than
  substituting anything; its call sites become commit_body elsewhere in
  the file.
* t7600-merge.sh, "merge --no-ff --edit".  The test grepped the raw
  commit object for a phrase and then stripped the header for the
  comparison.  The phrase is in the body rather than the header, so the
  grep now runs against the already-stripped body and both steps share
  one commit_body call.
* t3900-i18n-commit.sh, in test_commit_autosquash_multi_encoding().
  The stripped body was piped into "iconv".  Piping commit_body into
  "iconv" would reintroduce the exit-code hole,
  so the body is written to a file and "iconv"
  reads the file.
Everything else in the patch is the swap above.
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 11 in “t: add and use a commit_body test helper”
  1. 0/2 t: add and use a commit_body test helperShlok Kulshreshtha, Jul 26, 2026
  2. 1/2 test-lib-functions: add commit_body helperShlok Kulshreshtha, Jul 26, 2026
  3. 2/2 t: use commit_body to extract commit message bodiesShlok Kulshreshtha, Jul 26, 2026
  4. Junio C HamanoJul 27, 2026
  5. Shlok KulshreshthaJul 27, 2026
  6. 0/2 t: add and use a commit_body test helperShlok Kulshreshtha, Jul 27, 2026
  7. 1/2 test-lib-functions: add commit_body helperShlok Kulshreshtha, Jul 27, 2026
  8. 2/2 t: use commit_body to extract commit message bodiesShlok Kulshreshtha, Jul 27, 2026
  9. Junio C HamanoJul 29, 2026
  10. Shlok KulshreshthaJul 30, 2026
  11. Junio C HamanoJul 30, 2026

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.