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

Re: git push over http is very dangerous

From
Junio C Hamano <junkio@cox.net>
Date
Apr 21, 2007, 01:03 UTC
Message-ID
<7vfy6uwncc.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<462394AC.303@beronet.com>
Christian <crich-ml@beronet.com> writes:
Show 9 quoted lines
> We found out that it was broken, because we could not do a pull or
> clone from the central repository anymore, but we got an error message.
>
> Then i did a "git log" which worked well. then i wanted to "show" the
> last 2 commits, so i did: "git show":
>
> error: corrupt loose object 'cd1aac1a43cfdac07118240f75c0ba7662eb8140'
> <crich1999> error: cd1aac1a43cfdac07118240f75c0ba7662eb8140: object
> corrupt or missing

Thanks. I extracted that "corrupt" object, but all the archived versions of git I have at hand can read that tree just fine.

  $ ~/git-snap-v1.0.0/bin/git ls-tree cd1aac
  100644 blob 660424785bb8deda22ae5055fae1b16c466bc602	Kconfig.v2.6
  100644 blob 29553e41ee8d0941b1c119a3fdd4fcb9fa8cc44b	Makefile.v2.6
  040000 tree 3ba0db3caae4263808c925a598d707aaf4f82d68	mISDN
  $ ~/git-snap-v1.2.0/bin/git ls-tree cd1aac
  100644 blob 660424785bb8deda22ae5055fae1b16c466bc602	Kconfig.v2.6
  100644 blob 29553e41ee8d0941b1c119a3fdd4fcb9fa8cc44b	Makefile.v2.6
  040000 tree 3ba0db3caae4263808c925a598d707aaf4f82d68	mISDN
  $ ~/git-snap-v1.3.0/bin/git ls-tree cd1aac
  100644 blob 660424785bb8deda22ae5055fae1b16c466bc602	Kconfig.v2.6
  100644 blob 29553e41ee8d0941b1c119a3fdd4fcb9fa8cc44b	Makefile.v2.6
  040000 tree 3ba0db3caae4263808c925a598d707aaf4f82d68	mISDN
  $ ~/git-snap-v1.5.0/bin/git ls-tree cd1aac
  100644 blob 660424785bb8deda22ae5055fae1b16c466bc602	Kconfig.v2.6
  100644 blob 29553e41ee8d0941b1c119a3fdd4fcb9fa8cc44b	Makefile.v2.6
  040000 tree 3ba0db3caae4263808c925a598d707aaf4f82d68	mISDN
  $ ~/git-snap-v1.5.1/bin/git ls-tree cd1aac
  100644 blob 660424785bb8deda22ae5055fae1b16c466bc602	Kconfig.v2.6
  100644 blob 29553e41ee8d0941b1c119a3fdd4fcb9fa8cc44b	Makefile.v2.6
  040000 tree 3ba0db3caae4263808c925a598d707aaf4f82d68	mISDN
  $ git ls-tree cd1aac ;# this is 'next'
  100644 blob 660424785bb8deda22ae5055fae1b16c466bc602	Kconfig.v2.6
  100644 blob 29553e41ee8d0941b1c119a3fdd4fcb9fa8cc44b	Makefile.v2.6
  040000 tree 3ba0db3caae4263808c925a598d707aaf4f82d68	mISDN

I am starting to suspect that the loose object is actually Ok and you are suffering from something else (perhaps zlib).

We had a brief period that we had a bogusly strict error check after calling zlib, which Linus fixed with 456cdf and ac54c2 (these fixes are both in v1.5.1). The breakage was 7efbff, which was post v1.5.0.3 breakage, but was never been part of any official release without the two fixes from Linus.

HOWEVER (I mentioned the above paragraph to save people from going wild goose chase), this does not seem to be related to the breakage. I specifically built that revision and ls-tree from it reads the loose object just fine.

There is only one codepath that can emit this error message:
> error: corrupt loose object 'cd1aac1a43cfdac07118240f75c0ba7662eb8140'

so I am reasonably sure that you are running 7efbff or later version, but now I am out of ideas.

What version of git do you run?  And on what platform?
Previous: ChristianNext: Christian
Message 6 of 9 in “git push over http is very dangerous”
  1. ChristianApr 16, 2007
  2. Linus TorvaldsApr 16, 2007
  3. Junio C HamanoApr 16, 2007
  4. Linus TorvaldsApr 16, 2007
  5. ChristianApr 20, 2007
  6. Junio C HamanoApr 21, 2007
  7. ChristianApr 21, 2007
  8. Junio C HamanoApr 21, 2007
  9. ChristianApr 22, 2007

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.