Skip to content

pr-2204/nikolauspschuetz/ns/t1401-symbolic-ref-quiet-v2

tagged this 20 Aug 22:20
From: Nikolaus Schuetz <nikolauspschuetz@gmail.com>

git-symbolic-ref(1) documents that reading a name that is not a
symbolic ref exits non-zero, and that --quiet does so silently.
Tests such as t2020 and t5621 already rely on "symbolic-ref -q HEAD"
failing on a detached HEAD, but none pins the exact exit codes or
checks that --quiet actually suppresses the diagnostic.

Assert that a non-symbolic ref exits 128 with the "is not a symbolic
ref" message, and that --quiet instead exits 1 with no output.

Signed-off-by: Nikolaus Schuetz <nikolauspschuetz@gmail.com>

Submitted-As: https://lore.kernel.org/git/pull.2204.v2.git.1787264402361.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.2204.git.1786655554197.gitgitgadget@gmail.com
Assets 2
Loading