# diff without num-stat

6 messages from 2010-04-22 to 2010-04-23. Participants: Eli Barzilay, Michael J Gruber, Junio C Hamano.
Thread: https://gitlist.dev/t/23573

## Eli Barzilay, 2010-04-22 19:02

Subject: diff without num-stat
Message-ID: <19408.40250.102191.314496@winooski.ccs.neu.edu>
URL: https://gitlist.dev/e/19408.40250.102191.314496%40winooski.ccs.neu.edu

```
`git diff' has a `--numstat' flag, but is there any way to *avoid* the
numstat?  (I'm using `--stat' but want to void the summary line, and
I'd like to avoid piping it to `head'.)
-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

```

## Michael J Gruber, 2010-04-23 08:14

Subject: Re: diff without num-stat
Message-ID: <4BD156F8.5090307@drmicha.warpmail.net>
URL: https://gitlist.dev/e/4BD156F8.5090307%40drmicha.warpmail.net
In-Reply-To: <19408.40250.102191.314496@winooski.ccs.neu.edu>

```
Eli Barzilay venit, vidit, dixit 22.04.2010 21:02:
> `git diff' has a `--numstat' flag, but is there any way to *avoid* the
> numstat?  (I'm using `--stat' but want to void the summary line, and
> I'd like to avoid piping it to `head'.)

So, what DO you want? Except for the different formatting:

--stat output minus --numstat output == summary line

where "summary line" is something like

5 files changed, 5974 insertions(+), 0 deletions(-)

Do you want to (a)void the numstat or the summary?

Michael

```

## Junio C Hamano, 2010-04-23 09:21

Subject: Re: diff without num-stat
Message-ID: <7vwrvyzfr3.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vwrvyzfr3.fsf%40alter.siamese.dyndns.org
In-Reply-To: <4BD156F8.5090307@drmicha.warpmail.net>

```
Michael J Gruber <git@drmicha.warpmail.net> writes:

> Eli Barzilay venit, vidit, dixit 22.04.2010 21:02:
>> `git diff' has a `--numstat' flag, but is there any way to *avoid* the
>> numstat?  (I'm using `--stat' but want to void the summary line, and
>> I'd like to avoid piping it to `head'.)
>
> So, what DO you want? Except for the different formatting:
>
> --stat output minus --numstat output == summary line
>
> where "summary line" is something like
>
> 5 files changed, 5974 insertions(+), 0 deletions(-)
>
> Do you want to (a)void the numstat or the summary?

Summary is "create mode ..." etc. and you can already enable/disable it.

That "N files +M/-N lines in total" is _not_ a summary; it is an integral
part of ascii-graphical --stat output, which is supposed to produce output
like "git diff -p | diffstat".  We won't split it out of --stat without a
very good reason, there doesn't seem to be an option to "diffstat" for
such a thing, so...

```

## Eli Barzilay, 2010-04-23 17:14

Subject: Re: diff without num-stat
Message-ID: <19409.54647.62163.893635@winooski.ccs.neu.edu>
URL: https://gitlist.dev/e/19409.54647.62163.893635%40winooski.ccs.neu.edu
In-Reply-To: <4BD156F8.5090307@drmicha.warpmail.net>

```
On Apr 23, Michael J Gruber wrote:
> Eli Barzilay venit, vidit, dixit 22.04.2010 21:02:
> > `git diff' has a `--numstat' flag, but is there any way to *avoid* the
> > numstat?  (I'm using `--stat' but want to void the summary line, and
> > I'd like to avoid piping it to `head'.)
> 
> So, what DO you want?
> [...]
> where "summary line" is something like
> 
> 5 files changed, 5974 insertions(+), 0 deletions(-)

An option that avoids that summary line.


On Apr 23, Junio C Hamano wrote:
> 
> Summary is "create mode ..." etc. and you can already enable/disable it.

Right -- I'm asking about the above numstat summary line, which seems
to always be included with `--stat'.


> That "N files +M/-N lines in total" is _not_ a summary; it is an
> integral part of ascii-graphical --stat output, which is supposed to
> produce output like "git diff -p | diffstat".  We won't split it out
> of --stat without a very good reason, there doesn't seem to be an
> option to "diffstat" for such a thing, so...

Well, the reason is to have an easy-to-glance-over summary of changes
for push notification emails.  I didn't realize that the intention of
--stat was to be completely compatible with `diffstat'.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

```

## Junio C Hamano, 2010-04-23 17:47

Subject: Re: diff without num-stat
Message-ID: <7vaasuvz6r.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vaasuvz6r.fsf%40alter.siamese.dyndns.org
In-Reply-To: <19409.54647.62163.893635@winooski.ccs.neu.edu>

```
Eli Barzilay <eli@barzilay.org> writes:

> Well, the reason is to have an easy-to-glance-over summary of changes
> for push notification emails.  I didn't realize that the intention of
> --stat was to be completely compatible with `diffstat'.

I think you have it somewhat backwards.

Being the same as normal diffstat output that people are familiar with,
the output makes it "an easy-to-glance-over summary of changes" whereever
it is used, be it in a notification e-mail or from interactive command
output.

```

## Eli Barzilay, 2010-04-23 19:45

Subject: Re: diff without num-stat
Message-ID: <19409.63699.647720.327239@winooski.ccs.neu.edu>
URL: https://gitlist.dev/e/19409.63699.647720.327239%40winooski.ccs.neu.edu
In-Reply-To: <7vaasuvz6r.fsf@alter.siamese.dyndns.org>

```
On Apr 23, Junio C Hamano wrote:
> Eli Barzilay <eli@barzilay.org> writes:
> 
> > Well, the reason is to have an easy-to-glance-over summary of
> > changes for push notification emails.  I didn't realize that the
> > intention of --stat was to be completely compatible with
> > `diffstat'.
> 
> I think you have it somewhat backwards.
> 
> Being the same as normal diffstat output that people are familiar with,
> the output makes it "an easy-to-glance-over summary of changes" whereever
> it is used, be it in a notification e-mail or from interactive command
> output.

(That's true only if the intended audience of these notifications are
people who are familiar with diffstat output.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

```
