Re: error: char103: premature end of data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 08 June 2007, Johannes Schindelin wrote:
> Hi,
> 
> On Fri, 8 Jun 2007, Johan Herland wrote:
> 
> > On Friday 08 June 2007, Johannes Schindelin wrote:
> >
> > > I just tried to fetch from one of my repos which was perfectly usable 
> > > (and fetchable) before, and got this error message:
> > > 
> > > 	error: char103: premature end of data
> > 
> > Sorry about that. Do you have an idea of which tag object caused the 
> > failure? If so, could you send the output of "git-cat-file tag <name>" 
> > on it?
> 
> Yes, I know what causes it. A tag with an empty message.

Of course. Although if one uses git-tag -a to create an annotated tag object 
I have a hard time seeing why one wouldn't supply a message. But it's of 
course entirly valid not to supply a message.

> And I even know why it does that. It's easy. Look into git-tag.sh, and you 
> will find that it does a git-stripspace on the final message. If that was 
> empty, then the tag will just be the tag header.

You're right. I'll fix my code to handle this case. I'll also try to split
that first patch in my series into more manageable chunks.

> > git-fsck on the repo should report the same error. If you run with -v 
> > (verbose) you should also get some hints as to which tag object causes 
> > this.
> 
> Yes, it finds the error. And crashes. And costs me time.
> 
> Why do we have to parse _everything_ in the tag to begin with? It's not 
> like I will show the information of the darn thing when I just fetch it 
> from repo A into repo B.

We parse the tag completely in order to detect corruption/invalid tags as 
early as possible. If I'm pulling from a corrupt repo, I'd sure as hell 
want git to tell me when I first fetched, and not a couple of weeks later 
when I'd try to use the corrupt data, or call fsck, or whatever.

Again, I'm sorry for your problems.


...Johan

-- 
Johan Herland, <johan@xxxxxxxxxxx>
www.herland.net
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux