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

confusion with git diff-tree output

From
David Roundy <roundyd@physics.oregonstate.edu>
Date
Oct 21, 2009, 17:43 UTC
Message-ID
<117f2cc80910211043q3a92a7b6o15464cc049ee33dc@mail.gmail.com>
Hi all,

I've been struggling with trying to figure out how to make diff-tree output the actual files changed. Below is the output when I run diff-tree on a given commit. It reports that the directory is modified, rather than that a single file within that directory is modified. I can find out what *file* was modified by running diff-tree -p --raw, which gives me output similar to what I expected from a plain old diff-tree. Is there a flag that will make diff-tree give this information?

As background, what I really want is --name-only, which rarely reports the files modified, instead reporting the directories as modified, and I've been struggling to figure out what is going on. The documentation seems to imply that the --raw diff output will report modified files, and I haven't found anything indicating when it would report the directories containing the modified files instead.

Thanks! David

$ git diff-tree fd99a198222c14cf42fee82087a13467ff4a8205 fd99a198222c14cf42fee82087a13467ff4a8205 :040000 040000 8cdb796ea801da99c34d8f60045d8eb08fbb0e41 66b67ea1763799c0b2ac01f6803177ca870f6544 M Iolaus

$ git diff-tree fd99a198222c14cf42fee82087a13467ff4a8205 -p --raw fd99a198222c14cf42fee82087a13467ff4a8205 :100644 100644 dab4c531f3f69f08e5dc202ad8b6dfad9e8855fe 0e3f305e641a6440bb478765dfcd089e0420c155 M Iolaus/Lcs2.hs

diff --git a/Iolaus/Lcs2.hs b/Iolaus/Lcs2.hs
index dab4c53..0e3f305 100644
--- a/Iolaus/Lcs2.hs
+++ b/Iolaus/Lcs2.hs
(changes cut)
Next: Jan Krüger
Message 1 of 7 in “confusion with git diff-tree output”
  1. David RoundyOct 21, 2009
  2. Jan KrügerOct 21, 2009
  3. David RoundyOct 21, 2009
  4. Jan KrügerOct 21, 2009
  5. Jeff KingOct 23, 2009
  6. Junio C HamanoOct 24, 2009
  7. Jeff KingOct 24, 2009

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.