diff options
| author | Francesco Paparatto <francescopaparatto@gmail.com> | 2026-03-07 11:36:31 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-07 22:04:36 -0800 |
| commit | d3edca979a1e916518bc2376e468609ddae2a217 (patch) | |
| tree | 0d193cf5655b041159e8237048e6e4cc553e9eee /Documentation/git-format-patch.adoc | |
| parent | 67ad42147a7acc2af6074753ebd03d904476118f (diff) | |
| download | git-d3edca979a1e916518bc2376e468609ddae2a217.tar.xz | |
t3310: avoid hiding failures from rev-parse in command substitutions
Running `git` commands inside command substitutions like
test "$(git rev-parse A)" = "$(git rev-parse B)"
can hide failures from the `git` invocations and provide little
diagnostic information when `test` fails.
Use `test_cmp` when comparing against a stored expected value so
mismatches show both expected and actual output. Use `test_cmp_rev`
when comparing two revisions. These helpers produce clearer failure
output, making it easier to understand what went wrong.
Suggested-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Francesco Paparatto <francescopaparatto@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-format-patch.adoc')
0 files changed, 0 insertions, 0 deletions
