git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git diff --summary only seems to work when combined with --stat
@ 2010-12-06 20:55 demerphq
  2010-12-06 21:03 ` Jonathan Nieder
  0 siblings, 1 reply; 4+ messages in thread
From: demerphq @ 2010-12-06 20:55 UTC (permalink / raw)
  To: Git

Hi,

It seems like the --summary option only works in combination --stat.

It doesn't seem to work if I use it by itself, nor in combination with
--name-status or --num-stat. And depending on the order, it either
does nothing, or causes a usage note.

Is this intentional? If so, could it be reconsidered?  At the very
least in combination with --name-status and by itself, I can kind of
understand it not working with --numstat

Ive tested with two gits, and it seems to be the same in both:

git version 1.7.2.1 and git version 1.7.3.2.168.gd6b63

Cheers,
yves

$ git diff --summary --stat HEAD^
 somefile |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
$ git diff --summary HEAD^
$ git diff --summary --numstat HEAD^
12      2       somefile
$ git diff --summary --name-status HEAD^
M       somefile
$ git diff --name-status --sumary HEAD^
usage: git diff <options> <rev>{0,2} -- <path>*
$ git diff --numstat --sumary HEAD^
usage: git diff <options> <rev>{0,2} -- <path>*



-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git diff --summary only seems to work when combined with --stat
  2010-12-06 20:55 git diff --summary only seems to work when combined with --stat demerphq
@ 2010-12-06 21:03 ` Jonathan Nieder
  2010-12-07  6:53   ` demerphq
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Nieder @ 2010-12-06 21:03 UTC (permalink / raw)
  To: demerphq; +Cc: Git

Hi Yves,

demerphq wrote:

> It seems like the --summary option only works in combination --stat.
> 
> It doesn't seem to work if I use it by itself, nor in combination with
> --name-status or --num-stat. And depending on the order, it either
> does nothing, or causes a usage note.

It is tricky, but as you noticed --summary is not actually about the
diffstat.  --summary affects the output summarizing new files and
renamed files.

Example:

	$ git diff --summary v1.7.2..v1.7.3
	delete mode 100644 Documentation/RelNotes-1.5.0.1.txt
	delete mode 100644 Documentation/RelNotes-1.5.0.2.txt
	[...]

> $ git diff --name-status --sumary HEAD^
> usage: git diff <options> <rev>{0,2} -- <path>*

There is an 'm' missing here. :)

Hope that helps,
Jonathan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git diff --summary only seems to work when combined with --stat
  2010-12-06 21:03 ` Jonathan Nieder
@ 2010-12-07  6:53   ` demerphq
  2010-12-07  6:55     ` demerphq
  0 siblings, 1 reply; 4+ messages in thread
From: demerphq @ 2010-12-07  6:53 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Git

On 6 December 2010 22:03, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Hi Yves,
>
> demerphq wrote:
>
>> It seems like the --summary option only works in combination --stat.
>>
>> It doesn't seem to work if I use it by itself, nor in combination with
>> --name-status or --num-stat. And depending on the order, it either
>> does nothing, or causes a usage note.
>
> It is tricky, but as you noticed --summary is not actually about the
> diffstat.  --summary affects the output summarizing new files and
> renamed files.
>
> Example:
>
>        $ git diff --summary v1.7.2..v1.7.3
>        delete mode 100644 Documentation/RelNotes-1.5.0.1.txt
>        delete mode 100644 Documentation/RelNotes-1.5.0.2.txt
>        [...]
>
>> $ git diff --name-status --sumary HEAD^
>> usage: git diff <options> <rev>{0,2} -- <path>*
>
> There is an 'm' missing here. :)

Thanks for your reply. It turns out that was a mis-paste. I tried both
splelings of summary. ;-)

And none of them produce output.

$ git diff --summary HEAD^..HEAD
$ git diff --summary HEAD^^..HEAD
$ git diff --summary HEAD..HEAD^
$ git diff --summary HEAD^

So why does it work for you but not for me?

Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git diff --summary only seems to work when combined with --stat
  2010-12-07  6:53   ` demerphq
@ 2010-12-07  6:55     ` demerphq
  0 siblings, 0 replies; 4+ messages in thread
From: demerphq @ 2010-12-07  6:55 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Git

On 7 December 2010 07:53, demerphq <demerphq@gmail.com> wrote:
> On 6 December 2010 22:03, Jonathan Nieder <jrnieder@gmail.com> wrote:
>> Hi Yves,
>>
>> demerphq wrote:
>>
>>> It seems like the --summary option only works in combination --stat.
>>>
>>> It doesn't seem to work if I use it by itself, nor in combination with
>>> --name-status or --num-stat. And depending on the order, it either
>>> does nothing, or causes a usage note.
>>
>> It is tricky, but as you noticed --summary is not actually about the
>> diffstat.  --summary affects the output summarizing new files and
>> renamed files.
>>
>> Example:
>>
>>        $ git diff --summary v1.7.2..v1.7.3
>>        delete mode 100644 Documentation/RelNotes-1.5.0.1.txt
>>        delete mode 100644 Documentation/RelNotes-1.5.0.2.txt
>>        [...]
>>
>>> $ git diff --name-status --sumary HEAD^
>>> usage: git diff <options> <rev>{0,2} -- <path>*
>>
>> There is an 'm' missing here. :)
>
> Thanks for your reply. It turns out that was a mis-paste. I tried both
> splelings of summary. ;-)
>
> And none of them produce output.
>
> $ git diff --summary HEAD^..HEAD
> $ git diff --summary HEAD^^..HEAD
> $ git diff --summary HEAD..HEAD^
> $ git diff --summary HEAD^
>
> So why does it work for you but not for me?

Ah. Not enough coffee. It "doesnt work" because I am not adding or
renaming a file here?

Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-07  6:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-06 20:55 git diff --summary only seems to work when combined with --stat demerphq
2010-12-06 21:03 ` Jonathan Nieder
2010-12-07  6:53   ` demerphq
2010-12-07  6:55     ` demerphq

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 NNTP newsgroup(s).