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

Re: [PATCH] fsck: do not crash on tag objects which do not contain an empty line

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 7, 2007, 23:38 UTC
Message-ID
<Pine.LNX.4.64.0706080034510.4046@racer.site>
In-Reply-To
<200706080128.48637.johan@herland.net>
Hi,
On Fri, 8 Jun 2007, Johan Herland wrote:
Show 25 quoted lines
> On Friday 08 June 2007, Johannes Schindelin wrote:
> > 
> > On Fri, 8 Jun 2007, Johan Herland wrote:
> > 
> > > On Friday 08 June 2007, Johannes Schindelin wrote:
> > > > 
> > > > The first empty line in a tag object separates the header from the 
> > > > message. If the tag object has no empty line, do not crash, but 
> > > > complain loudly instead.
> > > 
> > > Aren't tag objects _required_ to have an empty line separating the 
> > > headers from the body? At least I wrote the new tag code with that 
> > > assumption in mind.
> > 
> > Yes, evidently you did.
> > 
> > But even then, isn't it always better to not rely on such assumptions, but 
> > fail gracefully? The rest of Git's source code seems to be nicer to 
> > failures as this one, IMHO.
> 
> I agree that we should fail gracefully, and my code is clearly not doing 
> that in this case. My bad.
> 
> But the code should also detect invalid tag objects, and in this case I'm 
> not yet convinced that the tag object causing the failure is in fact valid. 

IT BROKE GIT IN A REPO THAT WAS PERFECTLY VALID BEFORE, AND I COULD NOT DO ANYTHING AFTER THAT CHANGE.

Thank you very much again.
> If someone can convince me that the blank line after headers is optional, 
> then I'll gladly fix the code.
Convincing enough?
Show 7 quoted lines
> > > Could this be related to the "error: char103: premature end of data" 
> > > you're seeing?
> > 
> > Definitely. It breaks even _fetching_.
> 
> Sorry again. Still, if I could get a look at the object that'd help me alot 
> in debugging.

object f90084c7b53b1c2fb4606acafd84ef8a748a7d78 type commit tag start tagger me <me>

But I have to say that I am unlikely to review any fix you make, if that fix is as unreadable as those mega long lines with funny spaces in the middle of the line in that mega patch that unfortunately was already applied in next.

I need a beer, Dscho

Previous: Johan HerlandNext: Nicolas Pitre
Message 5 of 10 in “fsck: do not crash on tag objects which do not contain an empty line”
  1. fsck: do not crash on tag objects which do not contain an empty lineJohannes Schindelin, Jun 7, 2007
  2. Johan HerlandJun 7, 2007
  3. Johannes SchindelinJun 7, 2007
  4. Johan HerlandJun 7, 2007
  5. Johannes SchindelinJun 7, 2007
  6. Nicolas PitreJun 8, 2007
  7. Johan HerlandJun 8, 2007
  8. Junio C HamanoJun 8, 2007
  9. Johannes SchindelinJun 8, 2007
  10. Andy ParkinsJun 8, 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.