Thread (11 messages) 11 messages, 5 authors, 2026-08-31

Re: [PATCH v2] t1401: check symbolic-ref exit codes and --quiet silence

From: Junio C Hamano <hidden>
Date: 2026-08-24 18:23:43

Patrick Steinhardt [off-list ref] writes:
I'm still not completely sold that this difference is intentional. As
you mentioned elsewhere, in one code path we use `exit(1)` and in the
other we use `die(...)` to print an error message, which returs 128. But
that to me feels more like nobody noticed that those return different
error codes rather than an intentional difference in design, so casting
that behaviour into stone with new tests feels wrong to me.
I tend to agree.  The choice of 1 would have been more about "we
need to exit with non-zero status" than "we need to use something
different from what is used by die()".
I'd suggest that we either:

  - Continue not checking for the exact error code.

  - Adapt the `exit(1)` to instead be `die(NULL)` so that we have the
    same error code across both code paths and then verify that both
    have the same error code.
Both sounds very sensible.

Especially the former to avoid overspecifying what does not matter
in the end.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help