On Wed, May 09, 2018 at 07:00:10PM -0700, Taylor Blau wrote:
> > - they test with context (-C3) for us. It looks like GNU grep omits
> >context lines with "-o", but we show a bunch of blank lines. This is
> >I guess a bug (though it seems kind of an odd combination to specify
> >in th
On Tue, May 08, 2018 at 01:25:17PM -0400, Jeff King wrote:
> On Sat, May 05, 2018 at 08:49:43AM +0200, Ævar Arnfjörð Bjarmason wrote:
>
> > > +test_expect_success 'grep --only-matching --heading' '
> > > + git grep --only-matching --heading --line-number --column mmap file
> > > >actual &&
> > > +
On Sat, May 05, 2018 at 08:49:43AM +0200, Ævar Arnfjörð Bjarmason wrote:
> > +test_expect_success 'grep --only-matching --heading' '
> > + git grep --only-matching --heading --line-number --column mmap file
> > >actual &&
> > + test_cmp expected actual
> > +'
> > +
> > cat >expected < > hel
On Sat, May 05, 2018 at 03:36:12AM -0400, Eric Sunshine wrote:
> On Sat, May 5, 2018 at 12:03 AM, Taylor Blau wrote:
> > Teach GNU grep(1)'s '-o' ('--only-matching') to 'git-grep'. This option
> > prints only the matching components of each line. It writes multiple
> > lines if more than one match
On Sat, May 5, 2018 at 12:03 AM, Taylor Blau wrote:
> Teach GNU grep(1)'s '-o' ('--only-matching') to 'git-grep'. This option
> prints only the matching components of each line. It writes multiple
> lines if more than one match exists on a given line.
>
> For example:
>
> $ git grep -on --column
On Sat, May 05 2018, Taylor Blau wrote:
> +--o::
> +--only-matching::
> + Show only the matching part of the lines.
> +
Makes sense to steal GNU grep's description here:
Print only the matched (non-empty) parts of a matching line, with
each such part on a separate output line.
> +
Teach GNU grep(1)'s '-o' ('--only-matching') to 'git-grep'. This option
prints only the matching components of each line. It writes multiple
lines if more than one match exists on a given line.
For example:
$ git grep -on --column --heading git -- README.md | head -3
README.md
15:56:git
1
7 matches
Mail list logo