From: Phillip Wood Date: Sat, 24 Oct 2026 09:52:29 GMT Subject: Re: [Outreachy] Question about check-ref-format test coverage Message-ID: In-Reply-To: On 23/10/2026 16:53, Harald Nordgren wrote: >> >> ./git check-ref-format --allow-onelevel foo >> >> ./git check-ref-format --allow-onelevel --no-allow-onelevel foo >> >> it returned with an exit code of 0 and 1 respectively. > > `--allow-onelevel´ and ´--no-allow-onelevel´ are contradictory > options, and shouldn't be run together, so that's likely why it failed > with exit code 1. > > This is true for any `--xyz´ and ´--no-xyz´ options. Our commands allow "--no-xyz" to override "--xyz" which is useful when an alias includes "--xyz" and you want to use the alias without that option. The second command above exits 1 because "foo" is a one-level ref and we've passed "--no-allow-onelevel" which overrides the earlier "--allow-onelevel" Thanks Phillip