git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Francesco PaparattoNext: Eric Sunshine
Message 4 of 15 in “t3310: avoid hiding failures from rev-parse in command substitutions”
  1. t3310: avoid hiding failures from rev-parse in command substitutionsFrancesco Paparatto, Mar 4, 2026
  2. Eric SunshineMar 4, 2026
  3. t3310: avoid hiding failures from rev-parse in command substitutionsFrancesco Paparatto, Mar 5, 2026
  4. Junio C HamanoMar 5, 2026
  5. Eric SunshineMar 5, 2026
  6. Francesco PaparattoMar 5, 2026
  7. Junio C HamanoMar 5, 2026
  8. Junio C HamanoMar 5, 2026
  9. Francesco PaparattoMar 5, 2026
  10. t3310: avoid hiding failures from rev-parse in command substitutionsFrancesco Paparatto, Mar 5, 2026
  11. Eric SunshineMar 7, 2026
  12. Francesco PaparattoMar 7, 2026
  13. t3310: avoid hiding failures from rev-parse in command substitutionsFrancesco Paparatto, Mar 7, 2026
  14. Eric SunshineMar 8, 2026
  15. Junio C HamanoMar 8, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.