Re: [PATCH] rev-list: restore the NUL commit separator in --header mode
- From
Dennis Kaarsemaker <dennis@kaarsemaker.net>
- Date
- Oct 20, 2016, 18:04 UTC
- Message-ID
- <1476986671.28685.5.camel@kaarsemaker.net>
- In-Reply-To
- <xmqq4m48j70o.fsf@gitster.mtv.corp.google.com>
On Wed, 2016-10-19 at 15:41 -0700, Junio C Hamano wrote:
Show 8 quoted lines
> Dennis Kaarsemaker <dennis@kaarsemaker.net> writes: > > > + touch expect && > > + printf "\0" > expect && > > > What's the point of that "touch", especially if you are going to > overwrite it immediately after?
Leftover debugging crud. I tried various ways of generating an actual/expect to compare.
Show 9 quoted lines
> > + git rev-list --header --max-count=1 HEAD | tail -n1 >actual && > > > As "tail" is a tool for text files, it is likely unportable to use > "tail -n1" to grab the "last incomplete line that happens to contain > a single NUL". > > > + test_cmp_bin expect actual > > +'
Yeah, I was fearing that. I didn't find anything in the testsuite that helps answering the question "does this file end with a NUL" and would appreciate a hint :)
D.