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

Re: git 1.5.1-rc1 doesn't like empty files

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 20, 2007, 05:56 UTC
Message-ID
<20070320055611.GD29288@spearce.org>
In-Reply-To
<Pine.LNX.4.64.0703192237100.6730@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> wrote:
Show 16 quoted lines
> On Tue, 20 Mar 2007, Pavel Roskin wrote:
> > 
> > .git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 is the same 9
> > bytes:  30 78 9c 03 00 00 00 00 01
> 
> Ahh.. You have
> 
> 	[core]
> 		legacyheaders = false
> 
> don't you? If you didn't, you should see a 15-byte object, not a 9-byte 
> one.
> 
> And yes, I can reproduce this with that "core.legacyheaders=false" 
> setting. It seems that config option is simply broken, and we never 
> noticed, because almost nobody uses it.

For what it is worth, I have been running core.legacyheaders=false on both my PowerBook (my main dev system) and on my x86 Cygwin POS. I guess I've been lucky, as I've never noticed any sort of corruption.

Oh, wait, yes I did. Just the other day. A loose object got the same zlib error as Pavel asked about. But git-prune whacked the damn thing. I figured it was just a short write by Cygwin during some sort of operation that I may have aborted; e.g. aborting an update-index and running it again later, thus never actually using that particular blob.

I didn't think twice about the error (until now), especially since `git-fsck --full` did not whine after the corrupt loose object was gone.

-- 
Shawn.
Previous: Pavel RoskinNext: Alexander Litvinov
Message 7 of 18 in “git 1.5.1-rc1 doesn't like empty files”
  1. Pavel RoskinMar 20, 2007
  2. Nicolas VilzMar 20, 2007
  3. Linus TorvaldsMar 20, 2007
  4. Pavel RoskinMar 20, 2007
  5. Linus TorvaldsMar 20, 2007
  6. Pavel RoskinMar 20, 2007
  7. Shawn O. PearceMar 20, 2007
  8. Alexander LitvinovMar 20, 2007
  9. Andy ParkinsMar 20, 2007
  10. Junio C HamanoMar 20, 2007
  11. Andy ParkinsMar 20, 2007
  12. Linus TorvaldsMar 20, 2007
  13. Junio C HamanoMar 20, 2007
  14. Pavel RoskinMar 20, 2007
  15. Linus TorvaldsMar 20, 2007
  16. Junio C HamanoMar 20, 2007
  17. Junio C HamanoMar 20, 2007
  18. Linus TorvaldsMar 20, 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.