git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Mallon <christoph.mallon@gmx.de>
To: Joshua Jensen <jjensen@workspacewhiz.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git diff-tree against the root commit
Date: Sun, 07 Nov 2010 11:58:42 +0100	[thread overview]
Message-ID: <4CD68662.4060709@gmx.de> (raw)
In-Reply-To: <4CCA6623.8090705@workspacewhiz.com>

On 29.10.2010 08:13, Joshua Jensen wrote:
> I am mirroring a Git repository into another SCM.  I am using 'git diff-tree' to tell me what changes I need to make to the other SCM.
> 
> Today, I attempted to mirror a new submodule.  'git diff-tree' reported two SHAs... 0000000000000000000000000000000000000000 and the revision the submodule currently resides at.  I attempted to run a 'git diff-tree' within the submodule for the all zero SHA and the revision specified, but apparently, 0000000000000000000000000000000000000000 does not really represent the root commit and does not work.  I then discovered the --root option, but that doesn't seem to give me the complete file list either.
> 
> 'git diff-tree' has been working great for everything else, but I really need a root commit diff-tree listing for proper automation.
> 
> What are my options?

Diff against the empty tree. This gives you the treeish of the empty tree:
	git mktree < /dev/null
The result is 4b825dc642cb6eb9a060e54bf8d69288fbee4904. This magic number is used in git in several places. git's behaviour with parentless commits is somewhat annoying and/or broken.

  reply	other threads:[~2010-11-07 11:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29  6:13 git diff-tree against the root commit Joshua Jensen
2010-11-07 10:58 ` Christoph Mallon [this message]
2010-11-07 17:23   ` Linus Torvalds

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=4CD68662.4060709@gmx.de \
    --to=christoph.mallon@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=jjensen@workspacewhiz.com \
    /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 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).