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

Re: Any way to get complete diff up to a tag?

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
May 6, 2010, 15:27 UTC
Message-ID
<20100506152717.GA12230@atjola.homenet>
In-Reply-To
<A612847CFE53224C91B23E3A5B48BAC74482E50F03@xmail3.se.axis.com>
On 2010.05.06 17:09:57 +0200, Peter Kjellerstedt wrote:
Show 6 quoted lines
> 
> 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...

No, there can be only one SHA1 for the empty tree. It's the SHA1 hash of the object, and the empty tree is the empty tree, always.

git.git just happens to actually contain that object, so the abbreviated hash works, because git can find the object and doesn't actually need the hardcoded built-in empty tree (which is only used when the full hash is given).

Björn
Previous: Peter KjellerstedtNext: Linus Torvalds
Message 8 of 13 in “Any way to get complete diff up to a tag?”
  1. Peter KjellerstedtMay 6, 2010
  2. Bert WesargMay 6, 2010
  3. Björn SteinbrinkMay 6, 2010
  4. Peter KjellerstedtMay 6, 2010
  5. Santi BéjarMay 6, 2010
  6. Johannes SixtMay 6, 2010
  7. Peter KjellerstedtMay 6, 2010
  8. Björn SteinbrinkMay 6, 2010
  9. Linus TorvaldsMay 6, 2010
  10. Greg TroxelMay 6, 2010
  11. Peter KjellerstedtMay 7, 2010
  12. KnittlMay 6, 2010
  13. Peter KjellerstedtMay 7, 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.