From: Phil Hord <phil.hord@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Johannes Sixt <j6t@kdbg.org>, Phil Hord <hordp@cisco.com>,
"git@vger.kernel.org" <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>,
Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [PATCH 2/2] grep: use slash for path delimiter, not colon
Date: Mon, 26 Aug 2013 17:03:04 -0400 [thread overview]
Message-ID: <CABURp0pPzRH5JdPEooyZw0iccD891E1i_CbTqDfVJnx+drfQEw@mail.gmail.com> (raw)
In-Reply-To: <20130826205215.GB23598@sigill.intra.peff.net>
On Mon, Aug 26, 2013 at 4:52 PM, Jeff King <peff@peff.net> wrote:
> On Mon, Aug 26, 2013 at 10:13:14PM +0200, Johannes Sixt wrote:
>
>> Am 26.08.2013 21:56, schrieb Jeff King:
>> > Also, prevent the delimiter being added twice, as happens now in these
>> > examples:
>> >
>> > git grep -l foo HEAD:
>> > HEAD::some/path/to/foo.txt
>> > ^
>>
>> Which one of these two does it print then?
>>
>> HEAD:/some/path/to/foo.txt
>> HEAD:some/path/to/foo.txt
>
> It should (and does) print the latter.
>
> But I do note that our pathspec handling for subdirectories seems buggy.
> If you do:
>
> $ cd Documentation
> $ git grep -l foo | head -1
> RelNotes/1.5.1.5.txt
>
> that's fine; we limit to the current directory. But then if you do:
>
> $ git grep -l foo HEAD | head -1
> HEAD:RelNotes/1.5.1.5.txt
>
> we still limit to the current directory, but the output does not note
> this (it should be "HEAD:./RelNotes/1.5.1.5.txt"). I think this bug is
> orthogonal to Phil's patch, though.
Maybe not. My path completes the assumption that the L:R value
returned by grep is an object ref; but Junio still thought it wasn't.
I think this is another case where his view was correct.
There's more bad news on this front.
$ cd Documentation
$ git grep -l foo HEAD .. | head -1
HEAD:../.gitignore
That's not a valid ref, either (though maybe it could be).
Phil
next prev parent reply other threads:[~2013-08-26 21:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 14:46 [PATCHv2] grep: use slash for path delimiter, not colon Phil Hord
2013-08-26 19:28 ` Jeff King
2013-08-26 19:53 ` Jeff King
2013-08-26 19:54 ` [PATCH 1/2] grep: stop using object_array Jeff King
2013-08-26 19:56 ` [PATCH 2/2] grep: use slash for path delimiter, not colon Jeff King
2013-08-26 20:13 ` Johannes Sixt
2013-08-26 20:52 ` Phil Hord
2013-08-26 20:52 ` Jeff King
2013-08-26 21:03 ` Phil Hord [this message]
2013-08-26 21:13 ` Jeff King
2013-08-27 3:37 ` [PATCHv2] " Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2013-09-22 19:15 [PATCH 2/2] " Jonathon Mah
2013-09-24 6:57 ` 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=CABURp0pPzRH5JdPEooyZw0iccD891E1i_CbTqDfVJnx+drfQEw@mail.gmail.com \
--to=phil.hord@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=hordp@cisco.com \
--cc=j6t@kdbg.org \
--cc=jrnieder@gmail.com \
--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.
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).