Am 17.04.2016 um 07:59 schrieb Eric Sunshine:
On Sat, Apr 16, 2016 at 12:13:50PM -0400, Michael Rappazzo wrote:
+test_expect_success 'GIT_DIR=../.git, core.bare = false: prefix' '
+       mkdir work &&
+       test_when_finished "rm -rf work" &&
+       test_config -C "$(pwd)"/.git core.bare false &&
+       GIT_DIR=../.git test_stdout "" git -C work rev-parse --show-prefix 
>actual

Drop the unnecessary '>actual' redirection.

Not only that: setting an environment variable in front of a shell function invocation keeps the variable's value in some (most?) shells. This occurs frequently in the new code. I don't know whether we have a shorter pattern than

        (
                GIT_DIR=../.git &&
                export GIT_DIR &&
                test_stdout "" git -C work rev-parse --show-prefix
        )

-- Hannes

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to