All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shlok Kulshreshtha <diy2903@gmail.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Shlok Kulshreshtha <diy2903@gmail.com>
Subject: Re: [PATCH 0/2] t: add and use a commit_body test helper
Date: Mon, 27 Jul 2026 14:58:10 +0530	[thread overview]
Message-ID: <20260727092810.71405-1-diy2903@gmail.com> (raw)
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.

  reply	other threads:[~2026-07-27  9:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-26 22:48 [PATCH 0/2] t: add and use a commit_body test helper Shlok Kulshreshtha
2026-07-26 22:48 ` [PATCH 1/2] test-lib-functions: add commit_body helper Shlok Kulshreshtha
2026-07-26 22:48 ` [PATCH 2/2] t: use commit_body to extract commit message bodies Shlok Kulshreshtha
2026-07-27  8:15 ` [PATCH 0/2] t: add and use a commit_body test helper Junio C Hamano
2026-07-27  9:28   ` Shlok Kulshreshtha [this message]
2026-07-27  9:56   ` [PATCH v2 " Shlok Kulshreshtha
2026-07-27  9:56     ` [PATCH v2 1/2] test-lib-functions: add commit_body helper Shlok Kulshreshtha
2026-07-27  9:56     ` [PATCH v2 2/2] t: use commit_body to extract commit message bodies Shlok Kulshreshtha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260727092810.71405-1-diy2903@gmail.com \
    --to=diy2903@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.