Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Nikolaus Schuetz <nikolauspschuetz@gmail.com>
Cc: git@vger.kernel.org,  Patrick Steinhardt <ps@pks.im>,
	 Phillip Wood <phillip.wood123@gmail.com>
Subject: Re: [PATCH v2] t1401: check symbolic-ref exit codes and --quiet silence
Date: Mon, 24 Aug 2026 17:05:23 -0700	[thread overview]
Message-ID: <xmqqfr03oyik.fsf@gitster.g> (raw)
In-Reply-To: <20260824230527.24163-1-nikolauspschuetz@gmail.com> (Nikolaus Schuetz's message of "Mon, 24 Aug 2026 18:05:27 -0500")

Nikolaus Schuetz <nikolauspschuetz@gmail.com> writes:

> 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.

  reply	other threads:[~2026-08-25  0:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13 21:12 [PATCH] t1401: test symbolic-ref exit codes on a non-symbolic ref Nikolaus Schuetz via GitGitGadget
2026-08-19 11:25 ` Patrick Steinhardt
2026-08-20 15:13   ` Nikolaus Schuetz
2026-08-20 22:20 ` [PATCH v2] t1401: check symbolic-ref exit codes and --quiet silence Nikolaus Schuetz via GitGitGadget
2026-08-24 17:39   ` Patrick Steinhardt
2026-08-24 18:23     ` Junio C Hamano
2026-08-24 18:35       ` Phillip Wood
2026-08-24 23:05       ` Nikolaus Schuetz
2026-08-25  0:05         ` Junio C Hamano [this message]
2026-08-26 16:51 ` [PATCH v3] t1401: check symbolic-ref failure and --quiet silence on a non-symbolic ref Nikolaus Schuetz via GitGitGadget
2026-08-31  6:19   ` Patrick Steinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqfr03oyik.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=nikolauspschuetz@gmail.com \
    --cc=phillip.wood123@gmail.com \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox