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

Re: [PATCH 0/2] t: add and use a commit_body test helper

From
Shlok Kulshreshtha <diy2903@gmail.com>
Date
Jul 27, 2026, 09:28 UTC
Message-ID
<20260727092810.71405-1-diy2903@gmail.com>
In-Reply-To
<xmqqldawq24y.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
> Doesn't 'message_body' t7509 has follow the same pattern to hide
> exit code from 'git cat-file commit'?

Yes, you are right, I had missed that one. t7509 defines its own local message_body() helper:

    message_body () {
	git cat-file commit "$1" |
	sed -e '1,/^$/d'
    }

which pipes "git cat-file commit" into "sed", the same exit-code-hiding idiom commit_body was introduced to replace. While rechecking, I found one more site with the same problem in t3404-rebase-interactive.sh, a spacing variant of the idiom ("sed -e 1,/^\$/d" without quotes around the address) that didn't match the four spellings I had searched for in the original patch.

I've replaced both -- the message_body helper (and its call sites) in t7509, and the inline pipe in t3404 -- with commit_body. Will send a v2 with these folded in.

Thanks.
Previous: Junio C HamanoNext: Shlok Kulshreshtha
Message 5 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.