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.