From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
Jiang Xin <worldhello.net@gmail.com>,
Git List <git@vger.kernel.org>,
Jiang Xin <zhiyou.jx@alibaba-inc.com>
Subject: Re: [PATCH] revision: allow pseudo options after --end-of-options
Date: Mon, 12 Jul 2021 15:47:06 -0400 [thread overview]
Message-ID: <YOycOlyqwwWZJ6rH@coredump.intra.peff.net> (raw)
In-Reply-To: <xmqqim1f5pz8.fsf@gitster.g>
On Mon, Jul 12, 2021 at 11:47:23AM -0700, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > I don't think fully-qualifying refs is a complete solution, though. The
> > common use case for --end-of-options is that you're passing along names
> > from somewhere else, and you don't know how to qualify them. E.g., in:
> >
> > git rev-list --end-of-options "$rev" --
> >
> > you need to behave differently if you got "1234abcd" versus "foo" versus
> > "refs/heads/foo".
>
> I suspect that you can prefix "^^" unconditionally, just like --not
> can be emulated away by unconditionally prefixing "^".
That would be clever, but I think we only parse a single "^":
$ git rev-list ^HEAD
[no output]
$ git rev-list ^^HEAD
fatal: bad revision '^^HEAD'
$ git rev-parse ^HEAD
^d486ca60a51c9cb1fe068803c3f540724e95e83a
$ git rev-parse ^^HEAD
^^HEAD
fatal: ambiguous argument '^^HEAD': unknown revision or path not in the working tree.
-Peff
next prev parent reply other threads:[~2021-07-12 19:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 15:03 [PATCH] revision: allow pseudo options after --end-of-options Jiang Xin
2021-07-08 17:01 ` brian m. carlson
2021-07-09 1:33 ` Jiang Xin
2021-07-10 21:54 ` brian m. carlson
2021-07-12 17:54 ` Jeff King
2021-07-12 18:47 ` Junio C Hamano
2021-07-12 19:47 ` Jeff King [this message]
2021-07-12 20:09 ` Junio C Hamano
2021-07-13 8:57 ` Jiang Xin
2021-07-13 21:13 ` Jeff King
2021-07-27 6:10 ` Patrick Steinhardt
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=YOycOlyqwwWZJ6rH@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sandals@crustytoothpaste.net \
--cc=worldhello.net@gmail.com \
--cc=zhiyou.jx@alibaba-inc.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).