Re: [PATCH 0/3] --end-of-options marker
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Aug 6, 2019, 22:58 UTC
- Message-ID
- <20190806225853.GH118825@genre.crustytoothpaste.net>
- In-Reply-To
- <20190806143829.GA515@sigill.intra.peff.net>
On 2019-08-06 at 14:38:30, Jeff King wrote:
Show 11 quoted lines
> It's hard for scripted uses of rev-list, etc, to avoid option injection > from untrusted arguments, because revision arguments must come before > any "--" separator. I.e.: > > git rev-list "$revision" -- "$path" > > might mistake "$revision" for an option (with rev-list, that would make > it an error, but something like git-log would default to HEAD). > > This series provides an alternative to "--" to stop option parsing > without indicating that further arguments are pathspecs.
Sorry, I hadn't had a chance to look at this series in depth, but I was wondering: could we not just accept two separate "--" arguments, and if there are two of them, interpret the first with the traditional meaning and the second with the Git-specific meaning? That would be much more intuitive for folks, although I suspect it would take a little more work in the options parser.
-- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204