From: Jeff King <peff@peff.net>
To: "Randall S. Becker" <rsbecker@nexbridge.com>
Cc: 'Junio C Hamano' <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 0/3] --end-of-options marker
Date: Tue, 6 Aug 2019 13:38:17 -0400 [thread overview]
Message-ID: <20190806173817.GB4961@sigill.intra.peff.net> (raw)
In-Reply-To: <000f01d54c75$1a8fe460$4fafad20$@nexbridge.com>
On Tue, Aug 06, 2019 at 12:36:26PM -0400, Randall S. Becker wrote:
> > > This series provides an alternative to "--" to stop option parsing
> > > without indicating that further arguments are pathspecs.
>
> Would this offer the opportunity to, in the long term, supply options to
> external diff engines, for example?
>
> Something like git diff --end-of-options --diff-opt1 --diff-opt2 -- a b
I'd expect that to interpret "--diff-opt1" and "--diff-opt2" as
non-option arguments, which in the context of git-diff means endpoints
of the diff.
So no, I don't think you can use it like you're asking here.
> I'm just noodling here, wondering why otherwise
>
> git rev-list --max-parents=4 -- --count docs/
>
> does not work. I thought -- was pretty specific in terms of turning off
> interpretation. So is it not a defect that --count is being interpreted?
The command-line above means that "--count" is interpreted
(unambiguously) as a path. The problem is that if you want it to be
interpreted as a starting point for traversal, then it must come
_before_ the "--".
> I have a fear for all my sub-teams who script with the assumption that --
> has a specific meaning of stopping interpretation.
Nothing about "--" is changed by my series; it will still stop option
interpretation in rev-list and in other commands. But as before,
rev-list (and other Git commands that use the revision.c parser) use it
to separate revisions and pathspecs. That's unlike how most other
programs use "--", but that ship sailed for Git in 2005.
-Peff
next prev parent reply other threads:[~2019-08-06 17:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-06 14:38 [PATCH 0/3] --end-of-options marker Jeff King
2019-08-06 14:39 ` [PATCH 1/3] revision: allow --end-of-options to end option parsing Jeff King
2019-08-06 14:40 ` [PATCH 2/3] parse-options: allow --end-of-options as a synonym for "--" Jeff King
2019-08-06 14:40 ` [PATCH 3/3] gitcli: document --end-of-options Jeff King
2019-08-06 16:24 ` [PATCH 0/3] --end-of-options marker Junio C Hamano
2019-08-06 16:36 ` Randall S. Becker
2019-08-06 17:38 ` Jeff King [this message]
2019-08-06 17:58 ` Randall S. Becker
2019-08-06 18:14 ` SZEDER Gábor
2019-08-08 10:03 ` Jeff King
2019-08-06 17:33 ` Jeff King
2019-08-06 22:58 ` brian m. carlson
2019-08-06 23:43 ` Jeff King
2019-08-07 4:17 ` brian m. carlson
2019-08-07 16:54 ` Taylor Blau
2019-08-08 10:28 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190806173817.GB4961@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=rsbecker@nexbridge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).