Re: [PATCH 2/3] sha1_file: add the ability to parse objects in "pack file format"

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Tuesday, July 11, 2006 - 11:58 am

On Tue, 11 Jul 2006, Johannes Schindelin wrote:

Hey, whatever works. I rewrote more, and edited some of my changes down 
again..


It's not even correct in my version - I check the ASCII header _first_, so 
by the time it looks at the binary one, it already knows it's not ascii.

The problematic case is actually the other way around: my 
"parse_ascii_sha1_header()" isn't strict enough.

Or, more likely, the parse_sha1_header() function should just be changed 
to check the binary format first (and then add your comment about why that 
is safe).


No. The very first byte can have the 0x80 end marker, when the size was 
between 0..15.


Yeah, never mind. That function didn't actually need the hdrlen, it only 
cared about the SHA1.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Revisiting large binary files issue., Carl Baldwin, (Mon Jul 10, 4:01 pm)
Re: Revisiting large binary files issue., Junio C Hamano, (Mon Jul 10, 4:14 pm)
Re: Revisiting large binary files issue., Linus Torvalds, (Mon Jul 10, 4:28 pm)
Re: Revisiting large binary files issue., Carl Baldwin, (Tue Jul 11, 7:55 am)
Re: Revisiting large binary files issue., Linus Torvalds, (Tue Jul 11, 10:09 am)
Re: [PATCH 2/3] sha1_file: add the ability to parse object ..., Johannes Schindelin, (Tue Jul 11, 11:40 am)
Re: [PATCH 2/3] sha1_file: add the ability to parse object ..., Linus Torvalds, (Tue Jul 11, 11:58 am)
Re: [PATCH 2/3] sha1_file: add the ability to parse object ..., Johannes Schindelin, (Tue Jul 11, 12:20 pm)
Re: [PATCH 2/3] sha1_file: add the ability to parse object ..., Johannes Schindelin, (Tue Jul 11, 2:25 pm)
Re: [PATCH 2/3] sha1_file: add the ability to parse object ..., Johannes Schindelin, (Tue Jul 11, 5:39 pm)