git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH/RFC] Add [] as an alias for a reference to the empty tree

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 8, 2010, 16:07 UTC
Message-ID
<20100508160731.GA4638@progeny.tock>
In-Reply-To
<7vhbmjc6dy.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> The reason I am not interested in the feature
> is because I don't see much value in running "git diff EMPTY <anything>".
> Perhaps "git archive" might be what the user really wants to find.

I suspect the goal was to use a tool such as checkpatch, or get_maintainer without -f. An implementation using git archive should still work (with the help of a tar diff-ing program with the EMPTY feature ;-)), but as UI that might be less discoverable than building it into git diff.

Personally, I liked both the
  git diff $(</dev/null git hash-object -t tree --stdin) $rev
and
  git diff --root $rev
suggestions.  That may be from a warped sense of aesthetics.

Cheers, Jonathan

Previous: Jeff KingNext: Peter Kjellerstedt
Message 5 of 10 in “Add [] as an alias for a reference to the empty tree”
  1. Add [] as an alias for a reference to the empty treePeter Kjellerstedt, May 7, 2010
  2. Jeff KingMay 8, 2010
  3. Junio C HamanoMay 8, 2010
  4. Jeff KingMay 8, 2010
  5. Jonathan NiederMay 8, 2010
  6. Peter KjellerstedtMay 10, 2010
  7. Jeff KingMay 10, 2010
  8. Sverre RabbelierMay 10, 2010
  9. Jeff KingMay 10, 2010
  10. Sverre RabbelierMay 10, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.