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

[BUG] git-diff-tree or git-commit: wrong diff(stat)

From
MLMatthias Lederhofer <matled@gmx.net>
Date
Mar 5, 2007, 20:07 UTC
Message-ID
<20070305200751.GA13655@moooo.ath.cx>
git-commit.sh uses git-diff-tree [options] HEAD --.  The '--' was
added in 521f9c4d to prevent problems when HEAD exists as a file but
git-diff-tree shows only differences below the current directory when
'--' is used.  Hence git-commit in a subdirectory shows only stats for
the subdirectory.  Example:
~/foo% git init
Initialized empty Git repository in .git/
~/foo% mkdir d
~/foo% seq 1 10 | tee a > d/b
~/foo% git add a d/b
~/foo% cd d
~/foo/d% git commit -m blub
Created initial commit 49d6f2eac51d3a2665a539adc2cc8676e5b14a3d
 1 files changed, 10 insertions(+), 0 deletions(-)
 create mode 100644 d/b
Next: Junio C Hamano
Message 1 of 3 in “[BUG] git-diff-tree or git-commit: wrong diff(stat)”
  1. Matthias LederhoferMar 5, 2007
  2. Junio C HamanoMar 5, 2007
  3. Matthias LederhoferMar 5, 2007

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.