> -----Original Message----- > From: git-owner@xxxxxxxxxxxxxxx [mailto:git-owner@xxxxxxxxxxxxxxx] On > Behalf Of Johannes Sixt > Sent: den 6 maj 2010 15:04 > To: Peter Kjellerstedt > Cc: Björn Steinbrink; git@xxxxxxxxxxxxxxx > Subject: Re: Any way to get complete diff up to a tag? > > Am 5/6/2010 13:20, schrieb Peter Kjellerstedt: > > Björn Steinbrink > >> 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? > > Aha, so you think Björn et.al. were able to guess the SHA1 for your > specific repository? ;) No, not really, but I could not understand why it worked when I tested it in my clone of git itself, but not in another git repository. > No, the empty tree is the empty tree, and its name is as cited above, > no matter where in the universe you are. > > -- Hannes Well, I figured out my mistake. I had abbreviated the SHA1 since I typed it in manually, and it worked fine in git's own repository, but not in another repository. But when I used the full SHA1 it worked in both. So I guess the empty dir SHA1 hardcoded in git just happened to be the SHA1 for the empty dir in git's own repository... Since the 4b825dc642cb6eb9a060e54bf8d69288fbee4904 SHA1 is somewhat cumbersome to remember, wouldn't it be an idea to give it some kind of alias or mnemonic? E.g., something like @~ (or some other mix of odd characters which do not clash with all the other similar constructs already used for references). Anyway, thanks all for the help. //Peter -- 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