From: Junio C Hamano <gitster@pobox•com>
To: Stefan Hajnoczi <stefanha@redhat•com>
Cc: Brandon Williams <bmwill@google•com>,
git@vger•kernel.org, Jeff King <peff@peff•net>
Subject: Re: [PATCH v2 2/2] grep: use '/' delimiter for paths
Date: Tue, 07 Feb 2017 12:37:50 -0800 [thread overview]
Message-ID: <xmqq4m05zqht.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <xmqq8tphzr41.fsf@gitster.mtv.corp.google.com> (Junio C. Hamano's message of "Tue, 07 Feb 2017 12:24:30 -0800")
Junio C Hamano <gitster@pobox•com> writes:
Sorry, one shouldn't type while being sick and in bed X-<.
> I am not sure if you are shooting for is "work correctly" to begin
> with, to be honest. The current code always shows the "correct"
> output which is "the tree-ish object name (expressed in a way easier
> to understand by the humans), followed by a colon, followed by the
> path in the tree-ish the hit lies". You are making it "incorrect
> but often more convenient", and sometimes that is a worth goal, but
s/worth/&y/;
> for the particular use cases you presented, i.e.
>
> $ git grep -e "$pattern" "$commit:path"
>
> a more natural way to express "I want to find this pattern in the
> commit under that path" exists:
>
> $ git grep -e "$pattern" "$commit" -- path
>
> and because of that, I do not think the former form of the query
s/do not think/do think/
> should happen _less_ often in the first place, which would make it
> "incorrect but more convenient if the user gives an unusual query".
>
> So I am not sure if the change to "grep" is worth it.
Also, it may be fairer to do s/incorrect/inconsistent/.
next prev parent reply other threads:[~2017-02-07 20:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-20 17:11 [PATCH v2 0/2] grep: make output consistent with revision syntax Stefan Hajnoczi
2017-01-20 17:11 ` [PATCH v2 1/2] grep: only add delimiter if there isn't one already Stefan Hajnoczi
2017-01-20 22:19 ` Junio C Hamano
2017-01-20 17:11 ` [PATCH v2 2/2] grep: use '/' delimiter for paths Stefan Hajnoczi
2017-01-20 22:18 ` Junio C Hamano
2017-01-20 23:51 ` Brandon Williams
2017-02-07 15:04 ` Stefan Hajnoczi
2017-02-07 19:50 ` Jeff King
2017-02-07 20:24 ` Junio C Hamano
2017-02-07 20:37 ` Junio C Hamano [this message]
2017-02-09 3:58 ` Jeff King
2017-02-09 5:14 ` Junio C Hamano
2017-02-09 5:20 ` Jeff King
2017-02-14 9:43 ` Stefan Hajnoczi
2017-01-20 23:11 ` [PATCH v2 0/2] grep: make output consistent with revision syntax Junio C Hamano
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=xmqq4m05zqht.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=bmwill@google$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=peff@peff$(echo .)net \
--cc=stefanha@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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