On Tue, Aug 20, 2019 at 03:19:08AM -0400, Denton Liu wrote: > @@ -808,20 +821,24 @@ test_expect_success 'format-patch --ignore-if-in-upstream HEAD' ' > git format-patch --ignore-if-in-upstream HEAD > ' > > -git_version="$(git --version | sed "s/.* //")" > +test_expect_success 'get git version' ' > + git_version="$(git --version | sed "s/.* //")" > +' Oops, this should read git_version="$(git --version >version && sed "s/.* //" <version)" Anyway, I was considering keeping the upstream pipe but it feels very weird having an unchecked Git command (especially since, from what I can tell, `git --version` isn't tested anywhere else). Thoughts? > > signature() { > printf "%s\n%s\n\n" "-- " "${1:-$git_version}" > } > > test_expect_success 'format-patch default signature' ' > - git format-patch --stdout -1 | tail -n 3 >output && > + git format-patch --stdout -1 >patch && > + tail -n 3 patch >output && > signature >expect && > test_cmp expect output > ' > > test_expect_success 'format-patch --signature' ' > - git format-patch --stdout --signature="my sig" -1 | tail -n 3 >output && > + git format-patch --stdout --signature="my sig" -1 >patch && > + tail -n 3 patch >output && > signature "my sig" >expect && > test_cmp expect output > '