From: Tim Hockin Date: Sat, 20 Aug 2022 22:39:54 GMT Subject: rev-parse: -- is sometimes a flag and sometimes an arg? Message-ID: ``` $ git rev-parse unknown-tag unknown-tag fatal: ambiguous argument 'unknown-tag': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]' ``` OK ``` $ git rev-parse unknown-tag -- fatal: bad revision 'unknown-tag' ``` Much nicer error. But: ``` $ git rev-parse HEAD -- 113a928239196d0d9f70671517ce917071ceecf6 -- ``` That's not very nice. Why is "--" treated as an arg? ``` $ git rev-parse HEAD 113a928239196d0d9f70671517ce917071ceecf6 ``` Looking at rev-parse code it SEEMS to be intentional, but I can't comprehend why. Tim