Re: [PATCH v2] log,diff-tree: add --combined-with-paths options for merges with renames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 25, 2019 at 9:41 AM Derrick Stolee <stolee@xxxxxxxxx> wrote:
>
> On 1/25/2019 11:54 AM, Elijah Newren wrote:
> > +test_expect_success '--combined-with-paths works with -z as well' '
> > +     printf "0f9645804ebb04cc3eef91f799eb7fb54d70cefb\0::100644 100644 100644 f00c965d8307308469e537302baa73048488f162 088bd5d92c2a8e0203ca8e7e4c2a5c692f6ae3f7 333b9c62519f285e1854830ade0fe1ef1d40ee1b RR\0file\twith\ttabs\0i\tam\ttabbed\0fickle\tnaming\0" >expect &&
>
> I'm guessing that you use printf here because the
> 'cat <<-\EOF' approach doesn't work with the special
> tabs? Kudos for putting in the extra effort here for
> the special formatting!

Yeah, I didn't know how to easily get NUL bytes in the stream without
printf, and once I was using printf the EOF HEREDOC no longer had a
useful purpose.  In the first testcase, since there were only
printable characters in the expected output, a HEREDOC worked well.  I
guess I could have just used printf for both testcases, but having the
literal output shown where it's possible for a human to read it seemed
like an advantage worth capitalizing on.  If anyone feels strongly
that I should use printf for both tests, I can switch them though.

> The rest of the patch looks good.

Thanks for taking a look!




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux