From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Kevin Ballard <kevin@sb.org>, Git mailing list <git@vger.kernel.org>
Subject: Re: [RFC] Using gitrevisions :/search style with other operators
Date: Tue, 09 Nov 2010 07:59:03 -0800 [thread overview]
Message-ID: <7v4obqo5dk.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20101109051631.GA19867@sigill.intra.peff.net> (Jeff King's message of "Tue\, 9 Nov 2010 00\:16\:31 -0500")
Jeff King <peff@peff.net> writes:
>> Any comments on my suggestion to specify the ref to search from, e.g.
>> origin/pu:/"Merge 'kb/blame-author-email'"? As I stated before, I believe
>
> It seems to me the natural way to do that would be to use our existing
> generic "start at this ref and follow some chain" syntax, which is
> ref^{foo}. For example: origin/pu^{:Merge 'kb/blame-author-email'}.
>
> We already use it for "follow tree link" and "peel tag objects", and it
> is syntactically similar to the usual "follow the ancestry chain" syntax
> ("ref^"). And I believe it should be unambiguous, as nothing that could
> go in ^{} could start with ":". And presumably one would have to
> backslash-escape embedded closing curly braces.
Yeah, that may make more sense but I think the operation specifier should
be '/', not ':', no?
We chose ':' as a "funky SHA-1 expression introducer" that can be followed
by other letters to specify what kind of funkiness is being summoned (in
the case of ':/string', you are asking for "search" funkiness), so that we
can extend it with different kind of funkiness later. That is where my
earlier ':(...)' came from.
> We also have ref@{upstream}. The analogue here would be
> origin/pu@{:Merge 'kb/blame-author-email'}.
>
> I don't recall whether we put any conscious thought into ref@{upstream}
> versus ref^{upstream}.
I think that is because it is nonsensical to say sha1@{u} for an arbitrary
SHA-1 expression (i.e. the operator only makes sense for a branch ref we
can find branch.*.merge for). So from that perspective, you are right
that "Start from this commit and find an ancestor whose log message
contains this string" goes well with "sha1^{/some string}"
next prev parent reply other threads:[~2010-11-09 15:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-05 22:38 [RFC] Using gitrevisions :/search style with other operators Kevin Ballard
2010-11-08 19:09 ` Junio C Hamano
2010-11-08 22:11 ` Kevin Ballard
2010-11-09 5:16 ` Jeff King
2010-11-09 15:59 ` Junio C Hamano [this message]
2010-11-09 16:08 ` Jeff King
-- strict thread matches above, loose matches on Subject: below --
2010-11-09 7:30 Yann Dirson
2010-11-09 8:06 ` Kevin Ballard
2010-11-09 9:24 ` Yann Dirson
2010-11-10 0:18 ` Junio C Hamano
2010-11-10 0:33 ` Kevin Ballard
2010-11-10 7:32 ` Yann Dirson
2010-11-10 7:46 ` Kevin Ballard
2010-11-10 7:46 ` Yann Dirson
2010-11-10 15:26 ` Jakub Narebski
2010-11-10 17:23 ` Junio C Hamano
2010-11-10 18:19 ` Jakub Narebski
2010-11-09 16:10 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v4obqo5dk.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=kevin@sb.org \
--cc=peff@peff.net \
/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.
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 NNTP newsgroup(s).