From: Conrad Irwin Date: Tue, 10 May 2011 21:01:48 GMT Subject: Re: [PATCH] Test atomic git-commit --interactive Message-ID: In-Reply-To: <20110510194334.GA14456@sigill.intra.peff.net> On Tue, May 10, 2011 at 12:43 PM, Jeff King 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