From: Jeff King <peff@peff.net>
To: Kevin Ballard <kevin@sb.org>
Cc: Junio C Hamano <gitster@pobox.com>,
Git mailing list <git@vger.kernel.org>
Subject: Re: [RFC] Using gitrevisions :/search style with other operators
Date: Tue, 9 Nov 2010 00:16:31 -0500 [thread overview]
Message-ID: <20101109051631.GA19867@sigill.intra.peff.net> (raw)
In-Reply-To: <4F75AA0C-B68A-4ABB-B67A-D7F62D989655@sb.org>
On Mon, Nov 08, 2010 at 02:11:54PM -0800, Kevin Ballard wrote:
> > $ git log 'HEAD..:( :/Merge branch 'kb/blame-author-email' )^2'
> >
> > I haven't visited the particular codepath for some time, so I don't know
> > offhand how involved the change would be, though.
>
> Interesting idea. It certainly solves the problem of being able to embed it
> within other operations (though you do then have to worry about escaping any
> embedded close-parens in the search), though it does mean my suggestion for
> being able to select the 2nd (or nth) match won't work. When I have the time
> I'll start taking a look at the code.
>
> 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.
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}. Certainly the former implies to me finding a
particular starting point (as we do for reflogs), and the latter implies
walking object graph (either by parent ancestry links, or through
dereferencing tag and commit pointers). But I may just be rationalizing
after the fact. :)
Certainly this particular case seems to me to be more like "^" or "~";
you are walking the ancestry tree not a specific number of steps, but
until you see a particular subject.
-Peff
next prev parent reply other threads:[~2010-11-09 5:19 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 [this message]
2010-11-09 15:59 ` Junio C Hamano
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=20101109051631.GA19867@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kevin@sb.org \
/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).