On Tue, May 10, 2011 at 12:43 PM, Jeff King <peff@xxxxxxxx> wrote: > On Tue, May 10, 2011 at 12:12:31PM -0700, Conrad Irwin wrote: > >> +test_expect_success PERL \ >> + "--interactive doesn't change index if editor aborts" \ >> + "EDITOR=false echo zoo >file && \ > > This EDITOR bit does nothing, since it sets the value only for the > "echo" command. The test happens to do what you want, though, since we > set EDITOR to ":" in test-lib.sh, and that is also a fine value for your > test (it's probably a better test, anyway; it simulates the user > aborting with an empty message instead of the editor crashing). > (EDITOR=: && export EDITOR && > test_must_fail git commit --interactive) That makes sense, I was unaware of the : command, thank you. > You can drop the backslash-continuation on lines that end with "&&" or > "|", which makes things a bit more readable. Good to know. > So the result should look like: Awesome, thanks. Conrad -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html