From: Junio C Hamano <gitster@pobox.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Anatol Pomozov <anatol.pomozov@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Diff-tree does not work for initial commit
Date: Mon, 15 Sep 2008 13:54:42 -0700 [thread overview]
Message-ID: <7vprn59lkd.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <48CECA42.1050209@drmicha.warpmail.net> (Michael J. Gruber's message of "Mon, 15 Sep 2008 22:49:06 +0200")
Michael J Gruber <git@drmicha.warpmail.net> writes:
> Anatol Pomozov venit, vidit, dixit 15.09.2008 22:01:
>> 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
>
> From the man page:
>
> Compares the content and mode of the blobs found via two tree
> objects.
>
> If there is only one <tree-ish> given, the commit is compared
> with its parents (see --stdin below).
>
> Note that git-diff-tree can use the tree encapsulated in a commit
> object.
>
> The initial commit has no parent, so diff-tree does not know which tree
> to compare to.
--root?
next prev parent reply other threads:[~2008-09-15 20:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vprn59lkd.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=anatol.pomozov@gmail.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.