Re: [PATCH 1/2] hard-code the empty tree object
- From
Jeff King <peff@peff.net>
- Date
- Feb 15, 2008, 17:20 UTC
- Message-ID
- <20080215172043.GA24221@sigill.intra.peff.net>
- In-Reply-To
- <7vabm2i1pf.fsf@gitster.siamese.dyndns.org>
On Fri, Feb 15, 2008 at 09:11:56AM -0800, Junio C Hamano wrote:
Show 7 quoted lines
> > We also hard-code the special ref '{}' as an alias for the
> > empty tree. Users may refer to the empty tree by its
> > sha1 or by '{}'.
>
> I think the users of hard coded empty tree are oddballs. Let's
> not be too cute and instead leave it in the add -i patch. {} is
> already too cute.By "it" I assume you mean "the sha1 of the empty tree", meaning to not include the {} bit at all?
I am fine with that, as I don't think anyone has even mentioned a workflow where such a shorthand would be beneficial to users. The only one I can think of is to represent some tree using diff tools (e.g., "git diff --stat {} HEAD" instead of some variant on ls-files), but I have never once actually wanted to do that.
Should I re-send, or do you want to just markup the existing patches?
-Peff