Thread (11 messages) read the whole thread 11 messages, 2 authors, 1d ago

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

From: Shlok Kulshreshtha <hidden>
Date: 2026-07-27 09:28:17

Junio C Hamano [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help