Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15

Re: Can't diff against the 00000000 revision

From: Jeff King <hidden>
Date: 2016-06-15 23:07:43

On Tue, Jan 12, 2016 at 11:26:24AM -0500, Stefan Monnier wrote:
quoted
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:
quoted
  git diff 0000000 1234abcd
quoted
means. Is 0000000 a tree? A blob?
Well, Git is the one who uses 000000 to refer to an empty thing, but
indeed it seems like it does inconsistently: it's sometimes used as the
"empty blob" and sometimes as an "empty tree".
Yes. You can think of it kind of like a NULL pointer; it just means
"nothing". So its meaning is context-dependent. The problem is if we
expect to feed it back to git in a place where the context isn't
obvious.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help