From: Tim Hockin Date: Sun, 21 Aug 2022 00:39:36 GMT Subject: Re: rev-parse: -- is sometimes a flag and sometimes an arg? Message-ID: In-Reply-To: Sorry, I assumed it was clear, but that was dumb of me. I have a string - might be a tag name, might be a branch name, might be a SHA (complete or partial). I want to resolve that into a canonical SHA. My finger-memory is `git rev-parse`, but I can't say if that's just a bad habit I picked up somewhere... Tim On Sat, Aug 20, 2022 at 5:36 PM Junio C Hamano wrote: > > Tim Hockin writes: > > > Thanks. Is there a more friendly way to do what I'm trying to > > express? Should I just use `rev-list -n1` instead? > > That's hard to answer, as you didn't exactly say what you are trying > to express. All you asked was: why is "--" treated as an arg.