Re: [PATCH] rev-list: restore the NUL commit separator in --header mode

2016-10-20 Thread Junio C Hamano
Jacob Keller writes: > I did some searching, and we do use sed so I replaced it with sed \$!d > which appears to work. I think we should probably implement a > test_ends_with_nul or something. As it is "a stream editor that shall read one or more text files", I do not

Re: [PATCH] rev-list: restore the NUL commit separator in --header mode

2016-10-20 Thread Jacob Keller
On Thu, Oct 20, 2016 at 11:04 AM, Dennis Kaarsemaker wrote: > On Wed, 2016-10-19 at 15:41 -0700, Junio C Hamano wrote: >> Dennis Kaarsemaker writes: >> >> > + touch expect && >> > + printf "\0" > expect && >> >> >> What's the point of that

Re: [PATCH] rev-list: restore the NUL commit separator in --header mode

2016-10-20 Thread Dennis Kaarsemaker
On Wed, 2016-10-19 at 15:41 -0700, Junio C Hamano wrote: > Dennis Kaarsemaker 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

Re: [PATCH] rev-list: restore the NUL commit separator in --header mode

2016-10-20 Thread Dennis Kaarsemaker
On Wed, 2016-10-19 at 15:39 -0700, Junio C Hamano wrote: > Jacob Keller writes: > > > Hi, > > > > On Wed, Oct 19, 2016 at 2:04 PM, Dennis Kaarsemaker > > wrote: > > > Commit 660e113 (graph: add support for --line-prefix on all graph-aware > > >

Re: [PATCH] rev-list: restore the NUL commit separator in --header mode

2016-10-20 Thread Keller, Jacob E
On Wed, 2016-10-19 at 15:39 -0700, Junio C Hamano wrote: > Jacob Keller writes: > > > > > Hi, > > > > On Wed, Oct 19, 2016 at 2:04 PM, Dennis Kaarsemaker > > wrote: > > > > > > Commit 660e113 (graph: add support for --line-prefix on all > > >

Re: [PATCH] rev-list: restore the NUL commit separator in --header mode

2016-10-20 Thread Torsten Bögershausen
diff --git a/t/t6000-rev-list-misc.sh b/t/t6000-rev-list-misc.sh index 3e752ce..a2acff3 100755 --- a/t/t6000-rev-list-misc.sh +++ b/t/t6000-rev-list-misc.sh @@ -100,4 +100,11 @@ test_expect_success '--bisect and --first-parent can not be combined' ' test_must_fail git rev-list --bisect

Re: [PATCH] rev-list: restore the NUL commit separator in --header mode

2016-10-19 Thread Junio C Hamano
Dennis Kaarsemaker writes: > + touch expect && > + printf "\0" > expect && What's the point of that "touch", especially if you are going to overwrite it immediately after? > + git rev-list --header --max-count=1 HEAD | tail -n1 >actual && As "tail" is a

Re: [PATCH] rev-list: restore the NUL commit separator in --header mode

2016-10-19 Thread Junio C Hamano
Jacob Keller writes: > Hi, > > On Wed, Oct 19, 2016 at 2:04 PM, Dennis Kaarsemaker > wrote: >> Commit 660e113 (graph: add support for --line-prefix on all graph-aware >> output) changed the way commits were shown. Unfortunately this dropped >> the

Re: [PATCH] rev-list: restore the NUL commit separator in --header mode

2016-10-19 Thread Jacob Keller
Hi, On Wed, Oct 19, 2016 at 2:04 PM, Dennis Kaarsemaker wrote: > Commit 660e113 (graph: add support for --line-prefix on all graph-aware > output) changed the way commits were shown. Unfortunately this dropped > the NUL between commits in --header mode. Restore the NUL

[PATCH] rev-list: restore the NUL commit separator in --header mode

2016-10-19 Thread Dennis Kaarsemaker
Commit 660e113 (graph: add support for --line-prefix on all graph-aware output) changed the way commits were shown. Unfortunately this dropped the NUL between commits in --header mode. Restore the NUL and add a test for this feature. Signed-off-by: Dennis Kaarsemaker ---