git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Santi Béjar" <santi@agolina.net>
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Cc: "Björn Steinbrink" <B.Steinbrink@gmx.de>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Any way to get complete diff up to a tag?
Date: Thu, 6 May 2010 15:00:50 +0200	[thread overview]
Message-ID: <h2iadf1fd3d1005060600x95fc0e34m91b1697fc6f1789e@mail.gmail.com> (raw)
In-Reply-To: <A612847CFE53224C91B23E3A5B48BAC74482E50DE7@xmail3.se.axis.com>

2010/5/6 Peter Kjellerstedt <peter.kjellerstedt@axis.com>:
>> -----Original Message-----
>> From: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] On
>> Behalf Of Björn Steinbrink
>>
>> On 2010.05.06 11:27:40 +0200, Peter Kjellerstedt wrote:
>> > If I use
>> >
>> > $ git diff $(git rev-list --reverse v1.7.1 |head -1)..v1.7.1
>> >
>> > I almost get what I want, but the initial commit is still missing.
>> > Is there any way to get that initial commit included in the diff?
>>
>> git internally knows about the empty tree, so you can use:
>> git diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904 v1.7.1
>>
>> Björn
>
> Thank you, that was useful. However, I need to be able to do this
> for an arbitrary repository, and that SHA seems to be specific for
> the git repository. How do I get the SHA for the empty tree in an
> arbitrary repository?

It is not specific for the git repository, there is only one SHA1 for
the empty tree. But it is hard-coded in git itself since 1.5.5. If you
use an older git you have to create it yourself.

Santi

  reply	other threads:[~2010-05-06 13:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-06  9:27 Any way to get complete diff up to a tag? Peter Kjellerstedt
2010-05-06  9:42 ` Bert Wesarg
2010-05-06  9:42 ` Björn Steinbrink
2010-05-06 11:20   ` Peter Kjellerstedt
2010-05-06 13:00     ` Santi Béjar [this message]
2010-05-06 13:03     ` Johannes Sixt
2010-05-06 15:09       ` Peter Kjellerstedt
2010-05-06 15:27         ` Björn Steinbrink
2010-05-06 17:08         ` Linus Torvalds
2010-05-06 18:38           ` Greg Troxel
2010-05-07 16:35           ` Peter Kjellerstedt
2010-05-06 15:43 ` Knittl
2010-05-07  4:17   ` Peter Kjellerstedt

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=h2iadf1fd3d1005060600x95fc0e34m91b1697fc6f1789e@mail.gmail.com \
    --to=santi@agolina.net \
    --cc=B.Steinbrink@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=peter.kjellerstedt@axis.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).