Re: Any way to get complete diff up to a tag?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/5/6 Peter Kjellerstedt <peter.kjellerstedt@xxxxxxxx>:
>> -----Original Message-----
>> From: git-owner@xxxxxxxxxxxxxxx [mailto:git-owner@xxxxxxxxxxxxxxx] 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]