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

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

From
Shlok Kulshreshtha <diy2903@gmail.com>
Date
Jul 27, 2026, 09:56 UTC
Message-ID
<20260727095656.75496-1-diy2903@gmail.com>
In-Reply-To
<xmqqldawq24y.fsf@gitster.g>

Junio pointed out that t7509-commit-authorship.sh defines its own local message_body() helper that wraps the same "git cat-file commit | sed" idiom commit_body was introduced to replace, which the first version of this series missed. Rechecking the whole idiom by its sed address, rather than by grepping for "cat-file", turned up one more inline occurrence with a spacing/escaping variant in t3404-rebase-interactive.sh that also didn't match the four spellings enumerated in v1.

Changes since v1:
  2/2: fold in t7509's message_body helper (drop it, convert its six
       call sites to commit_body) and the missed inline site in t3404.
       Site count is now 61 in 12 files, plus the removed helper.
Shlok Kulshreshtha (2):
  test-lib-functions: add commit_body helper
  t: use commit_body to extract commit message bodies
 t/README                                  | 11 ++++
 t/t3404-rebase-interactive.sh             |  2 +-
 t/t3405-rebase-malformed.sh               |  8 +--
 t/t3408-rebase-multi-line.sh              |  4 +-
 t/t3434-rebase-i18n.sh                    |  3 +-
 t/t3900-i18n-commit.sh                    |  4 +-
 t/t4150-am.sh                             |  8 +--
 t/t7500-commit-template-squash-signoff.sh |  4 +-
 t/t7501-commit-basic-functionality.sh     | 21 +++----
 t/t7502-commit-porcelain.sh               | 77 ++++++++---------------
 t/t7509-commit-authorship.sh              | 23 +++----
 t/t7600-merge.sh                          | 14 ++---
 t/t7604-merge-custom-message.sh           | 18 ++----
 t/t7614-merge-signoff.sh                  |  9 +--
 t/test-lib-functions.sh                   |  8 +++
 15 files changed, 91 insertions(+), 123 deletions(-)
-- 
2.52.0
Previous: Shlok KulshreshthaNext: Shlok Kulshreshtha
Message 6 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.