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

Re: git diff-index --raw HEAD and git diff --raw HEAD output the same thing?

From
Ping Yin <pkufranky@gmail.com>
Date
Mar 2, 2008, 05:24 UTC
Message-ID
<46dff0320803012124m415516cbof1f3056773843455@mail.gmail.com>
In-Reply-To
<46dff0320803010510q67bc4101k9f85c71e5d20b4@mail.gmail.com>
On Sat, Mar 1, 2008 at 9:10 PM, Ping Yin <pkufranky@gmail.com> wrote:
Show 28 quoted lines
> Does these two commands output the same content except displaying format?
>
>  Follwoing is my test
>
>  $ git diff-index --raw HEAD
>  :160000 000000 ad1e416e87dc02617de68c41bb18e5abf0e24729
>  0000000000000000000000000000000000000000 D      WordBreak
>  :160000 160000 34f279b1662a6bef6a8fdea1827bbdbd80f12444
>  0000000000000000000000000000000000000000 M      commonmake
>  :160000 100644 c517f783d9efb5a8d24f80fb67f644a39afec2a6
>  e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 T      util
>
>  $ git diff --raw HEAD
>  :160000 000000 ad1e416e87dc02617de68c41bb18e5abf0e24729 0000000... D
>   WordBreak
>  :160000 160000 34f279b1662a6bef6a8fdea1827bbdbd80f12444
>  c1f46b3f10cc041e196c388490ddb049dacc7dc0 M      commonmake
>  :160000 100644 c517f783d9efb5a8d24f80fb67f644a39afec2a6 e69de29... T    util
>
>  Strange things is this line
>  :160000 160000 34f279b1662a6bef6a8fdea1827bbdbd80f12444
>  0000000000000000000000000000000000000000 M      commonmake
>
>  why mod is 160000 while sha1 is 0000...
>
>  --
>  Ping Yin
>
Any more response? Is this a bug or my misunderstanding?
-- 
Ping Yin
Previous: Ping YinNext: Ping Yin
Message 5 of 6 in “git diff-index --raw HEAD and git diff --raw HEAD output the same thing?”
  1. Ping YinMar 1, 2008
  2. Johannes SchindelinMar 1, 2008
  3. Junio C HamanoMar 2, 2008
  4. Ping YinMar 2, 2008
  5. Ping YinMar 2, 2008
  6. Fwd: git diff-index --raw HEAD and git diff --raw HEAD output the same thing?Ping Yin, Mar 2, 2008

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.