On Sun, 15 Jul 2007 16:58:16 +0200 "Marco Costalba" <mcostalba@xxxxxxxxx> wrote: > On 7/15/07, Sean <seanlkml@xxxxxxxxxxxx> wrote: > > > > If you only look for ^\0 (ie. first position only) the parsing should > > be okay. Not that it helps with the performance issue you're trying > > to address. > > > revisions are streamed, there is only one first revision, all the > others are linked togheter in a big stream. Right, but how does that alter the notion that ^\0 is the safe way to test for the "real" NUL terminator? > Actually I ended up looking for the character after the '\0' (if any) > to be 'c' that is the beginning of "commit <sha> ....." but it's a bit > hacky. Much more hacky than just testing for ^\0. AFAIU, the NUL is guaranteed to come at the start of the line and _all_ other NUL characters are guaranteed to appear somewhere else. Your current test will fail if a "c" happens to follow NUL in the patch text. Sean - 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