On Fri, May 18, 2018 at 02:50:21PM -0700, Taylor Blau wrote:
> [...]
>
> > Another might be to pick "foo" in the first and "bar" in the second
> > line, as that is the "first hit" on the line, which is consistent
> > with how "git grep -e foo" would say about "a foo b foo c foo" (I
> > expect that
Thanks for your thoughtful response. I answered in detail below, but I
think that we're in agreement about the semantics, with a few
corrections on my part. I'd like to push forward with this series,
including the proposed changes below, but feel that sending it as v7
would be asking too much of a
Taylor Blau writes:
> * `git grep --and -e foo -e bar`. This binary operation should recur
> on its sub-expressions and take the minimum of the starting offset
> and the maximum of the ending offset.
We use infix notation, so the above is "git grep -e foo --and -e
bar" actually ;-).
B
On Sat, May 12, 2018 at 03:07:04PM +0900, Junio C Hamano wrote:
> Taylor Blau writes:
>
> > I re-read your note and understand more clearly now what your suggestion
> > is. To ensure that we're in agreement, do you mean:
> >
> > 1. '--column -v' will _never_ give a column, but will never die(),
Taylor Blau writes:
> I re-read your note and understand more clearly now what your suggestion
> is. To ensure that we're in agreement, do you mean:
>
> 1. '--column -v' will _never_ give a column, but will never die(),
> either
No, I don't.
> 2. '--column --[and | or | not]' will nev
On Sat, May 12, 2018 at 02:08:48PM +0900, Junio C Hamano wrote:
> Taylor Blau writes:
>
> >> $ git grep -v second
> >> $ git grep --not -e second
> >>
> >> may hit all lines in this message (except for the obvious two
> >> lines), but we cannot say which column we found a hit. I am
> >> w
Taylor Blau writes:
>> $ git grep -v second
>> $ git grep --not -e second
>>
>> may hit all lines in this message (except for the obvious two
>> lines), but we cannot say which column we found a hit. I am
>> wondering if it is too grave a sin to report "the whole line is what
>> satisfie
On Thu, May 10, 2018 at 09:04:34AM +0900, Junio C Hamano wrote:
> Taylor Blau writes:
>
> > This check we should retain and change the wording to mention '--and',
> > '--or', and '--not' specifically.
>
> Why are these problematic in the first place? If I said
>
> $ git grep -e first --and -e
René Scharfe writes:
> Am 10.05.2018 um 02:04 schrieb Junio C Hamano:
> ...
>> $ git grep -v second
>> $ git grep --not -e second
>>
>> may hit all lines in this message (except for the obvious two
>> lines), but we cannot say which column we found a hit. I am
>> wondering if it is to
Am 10.05.2018 um 02:04 schrieb Junio C Hamano:
> Taylor Blau writes:
>
>> This check we should retain and change the wording to mention '--and',
>> '--or', and '--not' specifically.
>
> Why are these problematic in the first place? If I said
>
> $ git grep -e first --and -e these
> $
Taylor Blau writes:
> This check we should retain and change the wording to mention '--and',
> '--or', and '--not' specifically.
Why are these problematic in the first place? If I said
$ git grep -e first --and -e these
$ git grep -e first --and --not -e those
$ git grep -e first -
On Wed, May 09, 2018 at 07:26:57PM +0200, Martin Ågren wrote:
> On 9 May 2018 at 12:41, Phillip Wood wrote:
> > On 09/05/18 03:13, Taylor Blau wrote:
> >>
> >> +--column::
> >> + Prefix the 1-indexed byte-offset of the first match on non-context
> >> lines. This
> >> + option is inco
On Wed, May 09, 2018 at 11:41:02AM +0100, Phillip Wood wrote:
> Hi Taylor
>
> On 09/05/18 03:13, Taylor Blau wrote:
> > Teach 'git-grep(1)' a new option, '--column', to show the column
> > number of the first match on a non-context line. This makes it possible
> > to teach 'contrib/git-jump/git-jum
On Wed, May 09, 2018 at 06:17:20PM +0200, Duy Nguyen wrote:
> On Wed, May 9, 2018 at 4:13 AM, Taylor Blau wrote:
> > diff --git a/builtin/grep.c b/builtin/grep.c
> > index 5f32d2ce84..f9f516dfc4 100644
> > --- a/builtin/grep.c
> > +++ b/builtin/grep.c
> > @@ -829,6 +829,7 @@ int cmd_grep(int argc,
On 9 May 2018 at 12:41, Phillip Wood wrote:
> On 09/05/18 03:13, Taylor Blau wrote:
>>
>> +--column::
>> + Prefix the 1-indexed byte-offset of the first match on non-context
>> lines. This
>> + option is incompatible with '--invert-match', and extended
>> expressions.
>> +
>
>
> Sorr
On Wed, May 9, 2018 at 4:13 AM, Taylor Blau wrote:
> diff --git a/builtin/grep.c b/builtin/grep.c
> index 5f32d2ce84..f9f516dfc4 100644
> --- a/builtin/grep.c
> +++ b/builtin/grep.c
> @@ -829,6 +829,7 @@ int cmd_grep(int argc, const char **argv, const char
> *prefix)
>
Hi Taylor
On 09/05/18 03:13, Taylor Blau wrote:
Teach 'git-grep(1)' a new option, '--column', to show the column
number of the first match on a non-context line. This makes it possible
to teach 'contrib/git-jump/git-jump' how to seek to the first matching
position of a grep match in your editor,
Teach 'git-grep(1)' a new option, '--column', to show the column
number of the first match on a non-context line. This makes it possible
to teach 'contrib/git-jump/git-jump' how to seek to the first matching
position of a grep match in your editor, and allows similar additional
scripting capabiliti
18 matches
Mail list logo