From: Junio C Hamano Date: Tue, 10 Nov 2020 22:23:34 GMT Subject: Re: [PATCH 3/3] rev-parse: handle --end-of-options Message-ID: In-Reply-To: <20201110214019.GC788740@coredump.intra.peff.net> Jeff King writes: > This patch lets callers write: > > git rev-parse --end-of-options "$rev" -- "$path" > > and: > > git rev-parse --verify --end-of-options "$rev" > > which will both treat "$rev" always as a revision parameter. Nice. The only iffy case I can think of is that we can never have "--" to specify a rev, because with "git cmd -- -- path" we don't know which double-dash among the two is the disambiguator that makes the other double-dash to be either rev or path, but that is not a new problem with this change. > +test_expect_success 'verify respects --end-of-options' ' > + git update-ref refs/heads/-tricky HEAD && > + git rev-parse --verify HEAD >expect && > + git rev-parse --verify --end-of-options -tricky >actual && > + test_cmp expect actual > +' ;-) Or refs/heads/--tricky? The whole thing looked good. Thanks.