Re: Can't diff against the 00000000 revision

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

 



On Tue, Jan 12, 2016 at 07:11:14PM +0100, Andreas Schwab wrote:

> Jeff King <peff@xxxxxxxx> writes:
> 
> > And hopefully that explains why "000000" does not necessarily make a
> > good placeholder for "the empty thing". There are multiple empty things,
> > and it is not clear what:
> >
> >   git diff 0000000 1234abcd
> >
> > means. Is 0000000 a tree? A blob?
> 
> Perhaps there should be an easy syntax for an empty thing, something
> like 0^{tree} and 0^{blob}.  Not sure whether it is worth the effort,
> though.

I think I proposed a magic EMPTY_TREE token or something like that at
one point. It is slightly more convenient than trying to remember the
exact tree sha1, but I think in practice it doesn't save much effort
(outside of scripts, you can often use "--root" to accomplish the same
thing, depending on the command being run).

-Peff
--
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]