Re: [PATCH] t7600: merge tag shoud create a merge commit

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] t7600: merge tag shoud create a merge commit

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:29

y@quest-ce.net writes:
From: Yann Droneaud <redacted>

This test ensures a merge commit is always created
when merging an annotated (signed) tag without --ff-only option.

Signed-off-by: Yann Droneaud <redacted>
---

Here's a proposition for a test tath check the creation of a merge commit
when merging a tag.

It's not in final shape: the line 

    EDITOR=false test_must_fail git merge signed
Because test_must_fail is a shell function, single-shot environment
assignment like this should not be used.

Re: [PATCH] t7600: merge tag shoud create a merge commit

From: Yann Droneaud <hidden>
Date: 2016-06-15 22:56:29

Le 22.03.2013 15:48, Junio C Hamano a écrit :
quoted
It's not in final shape: the line

    EDITOR=false test_must_fail git merge signed
Because test_must_fail is a shell function, single-shot environment
assignment like this should not be used.
It's used throughout the test. The test 'merge --no-edit tag should 
skip editor' is using it.

Before posting my half useful test, I used "EDITOR=false test_must_fail 
set" in --verbose mode to find if EDITOR was correctly defined passed 
test_must_fail, and it was.

So it's still not clear why it's failing at failing. And it's making me 
angry.

Regards.

-- 
Yann Droneaud
OPTEYA

Re: [PATCH] t7600: merge tag shoud create a merge commit

From: Jeff King <hidden>
Date: 2016-06-15 22:56:29

On Fri, Mar 22, 2013 at 03:56:15PM +0100, Yann Droneaud wrote:
Le 22.03.2013 15:48, Junio C Hamano a écrit :
quoted
quoted
It's not in final shape: the line

   EDITOR=false test_must_fail git merge signed
Because test_must_fail is a shell function, single-shot environment
assignment like this should not be used.
It's used throughout the test. The test 'merge --no-edit tag should
skip editor' is using it.
It's OK to do:

  SINGLE_SHOT=foo some_real_command

and it's OK to do:

  some_fun args

but it's not OK to do:

  SINGLE_SHOT=foo some_function args

Because some POSIX shells do not create a new environment for the
function (and SINGLE_SHOT will persist after the call, polluting the
environment).
Before posting my half useful test, I used "EDITOR=false
test_must_fail set" in --verbose mode to find if EDITOR was correctly
defined passed test_must_fail, and it was.
I do not think there is a shell that does not set it; it is only that
some shells do not _unset_ it.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help