git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git diff --summary only seems to work when combined with --stat

From
Ddemerphq <demerphq@gmail.com>
Date
Dec 7, 2010, 06:55 UTC
Message-ID
<AANLkTinOCR1UpgZJNyxQNUTgK1A603YhOoEy-y-0v8AP@mail.gmail.com>
In-Reply-To
<AANLkTinuQoJLfDq8HhUd=FLoqosVD23MU6ch6Ea2iVSJ@mail.gmail.com>
On 7 December 2010 07:53, demerphq <demerphq@gmail.com> wrote:
Show 38 quoted lines
> 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/"
Previous: demerphq
Message 4 of 4 in “git diff --summary only seems to work when combined with --stat”
  1. demerphqDec 6, 2010
  2. Jonathan NiederDec 6, 2010
  3. demerphqDec 7, 2010
  4. demerphqDec 7, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.