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

git-diff-tree --root

From
RNRoman Neuhauser <neuhauser@sigpipe.cz>
Date
Sep 12, 2014, 13:06 UTC
Message-ID
<20140912130607.GX4075@isis.sigpipe.cz>
hello,

git-diff-tree without --root is absolutely silent for the root commit, and i see no bad effects of --root on non-root commits. are there any hidden gotchas? IOW, why is the --root behavior not the default?

cram[1] testcase::
  $ git init -q scratch
  $ cd scratch
  $ echo '.*.sw?' > .gitignore
  $ git add .gitignore
  $ git commit -q -m init .gitignore
  $ git diff-tree HEAD
  $ git diff-tree --root HEAD
  [0-9a-z]{40} (re)
  :000000 100644 0000000000000000000000000000000000000000 [0-9a-z]{40} A\\t.* (re)
[1] https://pypi.python.org/pypi/cram
-- 
roman
Next: Junio C Hamano
Message 1 of 4 in “git-diff-tree --root”
  1. Roman NeuhauserSep 12, 2014
  2. Junio C HamanoSep 12, 2014
  3. Roman NeuhauserSep 13, 2014
  4. Junio C HamanoSep 15, 2014

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.