Re: [PATCH v2] t3310: avoid hiding failures from rev-parse in command substitutions
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 5, 2026, 19:13 UTC
- Message-ID
- <xmqq5x7a3x9w.fsf@gitster.g>
- In-Reply-To
- <20260305090602.22436-1-francescopaparatto@gmail.com>
Francesco Paparatto <francescopaparatto@gmail.com> writes:
Show 13 quoted lines
> 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: Junio C Hamano <gitster@pobox.com>
Hmph, did I suggest this? I know Eric had comments on a previous round, and the improvements in this patch seems to be influenced a lot stronger by his input than whatever I may have said.
Show 7 quoted lines
> Signed-off-by: Francesco Paparatto <francescopaparatto@gmail.com> > --- > t/t3310-notes-merge-manual-resolve.sh | 60 ++++++++++++--------------- > 1 file changed, 27 insertions(+), 33 deletions(-) > > diff --git a/t/t3310-notes-merge-manual-resolve.sh b/t/t3310-notes-merge-manual-resolve.sh > index 92a5951331..64c0a753ff 100755
On top of what commit is this patch designed to apply?
Thanks.