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

"git diff --stat" doesn't show added empty file

From
Ping Yin <pkufranky@gmail.com>
Date
Jan 12, 2009, 03:36 UTC
Message-ID
<46dff0320901111936h6343e51fo94750d83e95743dc@mail.gmail.com>
$ git --version
git version 1.6.1.9.g97c34
$ mkdir test && cd test && git init && git commit --allow-empty -m
"Initial commit"
$ touch .gitignore && git add .gitignore && git commit -m "Add empty .gitignore"
$ git diff --stat HEAD^..
 0 files changed, 0 insertions(+), 0 deletions(-)
May be the following is better?
 .gitignore |    0 +
 1 files changed, 0 insertions(+), 0 deletions(-)
Ping Yin
Next: Johannes Schindelin
Message 1 of 6 in “"git diff --stat" doesn't show added empty file”
  1. Ping YinJan 12, 2009
  2. Johannes SchindelinJan 12, 2009
  3. Michael J GruberJan 12, 2009
  4. Johannes SchindelinJan 13, 2009
  5. Linus TorvaldsJan 12, 2009
  6. Ping YinJan 13, 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.