From: Marco Costalba Date: Sun, 15 Jul 2007 16:27:41 GMT Subject: Re: [PATCH] Add --show-size to git log to print message size Message-ID: In-Reply-To: <20070715121600.792982ef.seanlkml@sympatico.ca> On 7/15/07, Sean wrote: > On Sun, 15 Jul 2007 17:58:21 +0200 > "Marco Costalba" wrote: > > > What should I search for to find the revision boundary? "\n\0" ? is > > this that you mean with ^\0 > > Essentially yes. That pattern will never appear inside the comment > or patch text because both sections are always indented. So in the > example you cite, "\n\0" would match the proper terminator, and the > "\n-\0" NUL would be ignored. > But your scheme does not fail if the patch is not \n terminated ? It can happen if the patch adds lines at the end of a file and the last line is not \n terminated. In this case your scheme seems to miss the good next revision boundary. Marco