Re: [PATCH] Test atomic git-commit --interactive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]