diff options
| author | Shlok Kulshreshtha <diy2903@gmail.com> | 2026-07-27 15:26:55 +0530 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-07-27 12:58:37 -0700 |
| commit | a592d6feb3d47a1fcd6be5b4c8136e116c26ffbc (patch) | |
| tree | 05f9d73a9e5820d14cb098ff09b925c4ded9c185 /t/t4013/diff.diff_initial..side | |
| parent | 9a0c4701dcd5725c4184599322b52933ff5005ca (diff) | |
test-lib-functions: add commit_body helper
Extracting the message body of a commit -- running "git cat-file commit"
and stripping everything up to and including the first blank line with
"sed" -- is spelled out in about 60 places across the test suite.
Add a helper for it, so that the operation is written once instead of
being copied around.
The commit object goes to a temporary file rather than into a pipe,
because a pipeline reports only its last command's exit status, so a
failure of "git cat-file" would go unnoticed.
Signed-off-by: Shlok Kulshreshtha <diy2903@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions
