Re: [PATCH v2] log,diff-tree: add --combined-with-paths options for merges with renames
- From
Elijah Newren <newren@gmail.com>
- Date
- Jan 25, 2019, 17:52 UTC
- Message-ID
- <CABPp-BHTsZBO11ykfTaZ_dzpvrww5D3A57qBM05EgP_wK-iM9g@mail.gmail.com>
- In-Reply-To
- <2f785c2d-161c-b6a3-7743-b071969d60d7@gmail.com>
On Fri, Jan 25, 2019 at 9:41 AM Derrick Stolee <stolee@gmail.com> wrote:
Show 9 quoted lines
> > 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!