Subject: Re: [PATCH 0/5] t1400: modernize style

From: Kyle Meyer <[email-masked]>
Date: Tue, 21 Mar 2017 21:58:26 -0400

Jeff King <[email-masked]> writes:

> On Mon, Mar 20, 2017 at 08:56:11PM -0400, Kyle Meyer wrote:

[...]

>>   * moving the here-documents for log creation into the following
>>     tests, but I don't think it's worth it because it makes already
>>     long lines even longer.
>
> Yeah, they're quite long. Probably something like:
>
>   # arguments: <from> <to> <time> <msg>
>   reflog () {
> 	printf '%s %s %s <%s> %s +0000\t%s' \
> 		"$1" "$2" \
> 		"$GIT_COMMITTER_NAME" "$GIT_COMMITTER_EMAIL" \
> 		"$3" "$4"
>   }
>
>   test_expect_success 'verify $m log' '
> 	{
> 		reflog $Z $A 1117150200 "Initial Creation" &&
> 		reflog $A $B 1117150260 "Switch" &&
> 		reflog $B $A 1117150860 &&
> 	} >expect &&
> 	test_cmp expect .git/logs/$m
>   '
>
> wouldn't be too bad. Or maybe it's worse, because the actual format is
> all tangled up in that printf statement. ;)
>
> I'm OK with it either way.

Heh, I didn't consider that option.  I suppose I'll stick with the
here-document for now because, to my eyes, it seems a bit easier to
read.

-- 
Kyle