git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Diff-tree does not work for initial commit
@ 2008-09-15 20:01 Anatol Pomozov
  2008-09-15 20:49 ` Michael J Gruber
  0 siblings, 1 reply; 22+ messages in thread
From: Anatol Pomozov @ 2008-09-15 20:01 UTC (permalink / raw)
  To: Git Mailing List

Hi, It looks like I found a bug in git.

The problem: In my script I need to know what files were modified by
given commit. I use diff-tree for it. Although it works for most
cases, for initial commit it does not. Here is a sequence of actions.

anatol:~ $ mkdir mkdir initialcommitissue
anatol:~ $ cd initialcommitissue/
anatol:initialcommitissue $ git init
Initialized empty Git repository in /home/anatol/initialcommitissue/.git/
anatol:initialcommitissue $ echo "First commit" > 1.txt
anatol:initialcommitissue $ git add 1.txt
anatol:initialcommitissue $ git commit -m "First commit"
Created initial commit 31ccc6a: First commit
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 1.txt
anatol:initialcommitissue $ git diff-tree HEAD     <<<<< PROBLEM IS HERE
anatol:initialcommitissue $ echo "Second commit" > 2.txt
anatol:initialcommitissue $ git add 2.txt
anatol:initialcommitissue $ git commit -m "Second commit"
Created commit 51e8bcb: Second commit
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 2.txt
anatol:initialcommitissue $ git diff-tree HEAD
51e8bcbb739fc8329fc092db7a84b02bbc64feb2
:000000 100644 0000000000000000000000000000000000000000
c133ee6afb86d836ae607cc12e7b7b42242aa5fa A	2.txt


so git diff-tree HEAD works fine but git diff-tree HEAD~1 does not. I
guess in sake of consistency it should show all changed files in
initial commit.

-- 
anatol

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2008-09-22 13:33 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-15 20:01 Diff-tree does not work for initial commit Anatol Pomozov
2008-09-15 20:49 ` Michael J Gruber
2008-09-15 20:54   ` Junio C Hamano
2008-09-15 21:48     ` Anatol Pomozov
2008-09-15 21:09   ` Michael J Gruber
2008-09-15 21:11   ` Sverre Rabbelier
2008-09-15 22:34     ` Jeff King
2008-09-16  6:19       ` Sverre Rabbelier
2008-09-16  6:21         ` Jeff King
2008-09-18  9:21           ` [RFC/PATCH] extend meaning of "--root" option to index comparisons Jeff King
2008-09-18 16:31             ` Anatol Pomozov
2008-09-18 16:51               ` Sverre Rabbelier
2008-09-19 14:25               ` Jeff King
2008-09-19 16:54                 ` Anatol Pomozov
2008-09-19 17:39                   ` Jeff King
2008-09-19 20:27                 ` Re* " Junio C Hamano
2008-09-21 13:56                   ` Jeff King
2008-09-21 15:58                     ` Anatol Pomozov
2008-09-21 17:04                       ` Jakub Narebski
2008-09-22 13:15                       ` Jeff King
2008-09-21 18:48                     ` Junio C Hamano
2008-09-22 13:32                       ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).