Re: [GSoC][PATCH v3 2/3] t3600: modernize style
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 21 quoted lines
> This test is unusual in that it first cd's into a subdirectory and
> then cd's back out with "cd ..". And, while the use of subshells is
> correct to ensure that all 'cd' commands are undone at the end of the
> test (whether successful or not), the entire construction is
> unnecessarily confusing. This is not the sort of issue which should be
> fixed in this style-fix patch, however, it is something which could be
> cleaned up with a follow-up patch. For instance, the test might be
> reworked like this:
>
> git init repo &&
> (
> cd repo &&
> echo something >somefile &&
> git add somefile &&
> git commit -m "add a file"
> ) &&
> git --git-dir=repo/.git --work-tree=repo rm somefile &&
> test_must_fail git -C repo ls-files --error-unmatch somefile
>
> It's up to you whether you actually want to include such a follow-up
> patch in your series; it's certainly not a requirement.
I missed that. As you said, it can be left for further clean-up.