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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 25, 2026, 00:05 UTC
Message-ID
<xmqqfr03oyik.fsf@gitster.g>
In-Reply-To
<20260824230527.24163-1-nikolauspschuetz@gmail.com>
Nikolaus Schuetz <nikolauspschuetz@gmail.com> writes:
Show 18 quoted lines
> I would favor continuing to not test for the exact error code, and
> would rather not disturb anything scripts may already rely on.
>
> In either case the git-symbolic-ref.adoc NOTES are out of sync with the
> actual behavior:
>
>   'git symbolic-ref' will exit with status 0 [...], with status 1 if the
>   requested name is not a symbolic ref, or 128 if another error occurs.
>
> To describe the actual behavior:
>
>   'git symbolic-ref' will exit with status 0 if the contents of the
>   symbolic ref were printed correctly, with status 1 if the requested
>   name is not a symbolic ref and --quiet was given, or with status 128
>   if it is not a symbolic ref and --quiet was not given, or another
>   error occurs.
>
> If that sounds OK I can update the adoc and call it good.

This is the kind of "casting wrong behaviour into stone by either documentation or tests" that I advised against in my earlier message.

Previous: Nikolaus SchuetzNext: Nikolaus Schuetz via GitGitGadget
Message 9 of 11 in “t1401: test symbolic-ref exit codes on a non-symbolic ref”
  1. t1401: test symbolic-ref exit codes on a non-symbolic refNikolaus Schuetz via GitGitGadget, Aug 13, 2026
  2. Patrick SteinhardtAug 19, 2026
  3. Nikolaus SchuetzAug 20, 2026
  4. t1401: check symbolic-ref exit codes and --quiet silenceNikolaus Schuetz via GitGitGadget, Aug 20, 2026
  5. Patrick SteinhardtAug 24, 2026
  6. Junio C HamanoAug 24, 2026
  7. Phillip WoodAug 24, 2026
  8. Nikolaus SchuetzAug 24, 2026
  9. Junio C HamanoAug 25, 2026
  10. t1401: check symbolic-ref failure and --quiet silence on a non-symbolic refNikolaus Schuetz via GitGitGadget, Aug 26, 2026
  11. Patrick SteinhardtAug 31, 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.