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

Re: git merging

From
Linus Torvalds <torvalds@osdl.org>
Date
Jun 20, 2005, 15:58 UTC
Message-ID
<Pine.LNX.4.58.0506200844420.2268@ppc970.osdl.org>
In-Reply-To
<20050620123053.GI15021@suse.de>
[ Daniel put on the To: list to see if he can confirm or deny my theory ]
On Mon, 20 Jun 2005, Jens Axboe wrote:
> 
> axboe@nelson:[.]l/git/linux-2.6-block.git $ git prune
> error: cannot map sha1 file c39ae07f393806ccf406ef966e9a15afc43cc36a
That's the 2.6.11 "tree" object.
Show 7 quoted lines
> bad sha1 entry '5dc01c595e6c6ec9ccda4f6f69c131c0dd945f8c'
> axboe@nelson:[.]l/git/linux-2.6-block.git $ git-fsck-cache 
> error: cannot map sha1 file c39ae07f393806ccf406ef966e9a15afc43cc36a
> bad object in tag 5dc01c595e6c6ec9ccda4f6f69c131c0dd945f8c
> bad sha1 entry '5dc01c595e6c6ec9ccda4f6f69c131c0dd945f8c'
> 
> Running git prune again gives me the same output. What is wrong?

Very interesting. You have my "v2.6.11-tree" tag file pointing the 2.6.11 tree object, but you seem to not have that 2.6.11 tree itself.

Actually, judging from the fact that you got this error _during_ the prune, maybe you never had it in that repository in the first place?

In particular, if you don't use "rsync", but instead use one of the "optimized pull" things to create a repository (ie git-http-pull or git-ssh-pull), I think your newly pulled tree will always miss anything that isn't a head. And the 2.6.11 tree is a special case: it's a pure "tree" object without any commit at all pointing to it, just a single tag that points directly to the tree.

Anyway, the fact that you're missing the original 2.6.11 tree doesn't really matter, so it's not a huge deal per se. You can re-populate it with an "rsync -avz --ignore-existing", but clearly something seems to be wrong.

Daniel: I think git-ssh-pull has problems with any refs that aren't
commits. I also noticed earlier that I can't use git-ssh-push -w to write
a tag - it is apparently unhappy because it would write a "tag" object,
and it only wants to write references to "commit" objects. The same thing
might be true about the special "tag to a tree" object?

Jeff, do you remember (did you check?) if your prune problems might also have been about the tag to a tree?

		Linus
Previous: Jens AxboeNext: Daniel Barkalow
Message 10 of 16 in “Re: git merging”
  1. Linus TorvaldsJun 17, 2005
  2. Jens AxboeJun 17, 2005
  3. Jeff GarzikJun 17, 2005
  4. Linus TorvaldsJun 17, 2005
  5. Jeff GarzikJun 17, 2005
  6. Linus TorvaldsJun 18, 2005
  7. Jens AxboeJun 20, 2005
  8. Matthias UrlichsJun 20, 2005
  9. Jens AxboeJun 20, 2005
  10. Linus TorvaldsJun 20, 2005
  11. Daniel BarkalowJun 20, 2005
  12. Matthias UrlichsJun 20, 2005
  13. Jens AxboeJun 20, 2005
  14. Linus TorvaldsJun 20, 2005
  15. Jens AxboeJun 21, 2005
  16. Linus TorvaldsJun 21, 2005

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.