On Fri, Dec 15, 2017 at 08:58:22AM -0800, Junio C Hamano wrote: > Jeff King <peff@xxxxxxxx> writes: > > > I think (4) and (5) are the only things that actually change the > > behavior in a meaningful way. But they're a bit more hacky and > > repetitive than I'd like. Especially given that I'm not really sure > > we're solving an interesting problem. I'm happy enough with the patch as > > shown, and I do not recall anybody complaining about the current > > behavior of these options. > > OK. Thanks for thinking it through. I took one final look at this, wondering if it ought to follow the "write to BUILD-OPTIONS only if set" pattern that some other variables do. But I think that just ends up more confusing, because of the way we use the variable from both the Makefile and test-lib.sh. So it makes this work: make make -C t TEST_SHELL_PATH=whatever but not quite this: make TEST_SHELL_PATH=one make -C t TEST_SHELL_PATH=two because in the second case, we use "two" to invoke the test script, but a "--tee" re-exec would use "one". Which is pretty subtle. I really wish there was a way for a shell script to find out which interpreter it was currently using, but I couldn't come up with a portable way to do so (on some systems, /proc/$$/exe works, but that's obviously not something we should count on). So anyway. I think I'm OK with the series as-is. -Peff