Luke Diamand <l...@diamand.org> writes:

> diff --git a/t/t9813-git-p4-preserve-users.sh 
> b/t/t9813-git-p4-preserve-users.sh
> index 166b840..fe65788 100755
> --- a/t/t9813-git-p4-preserve-users.sh
> +++ b/t/t9813-git-p4-preserve-users.sh
> @@ -53,7 +53,8 @@ test_expect_success 'preserve users' '
>               git commit --author "Alice <al...@example.com>" -m "a change by 
> alice" file1 &&
>               git commit --author "Bob <b...@example.com>" -m "a change by 
> bob" file2 &&
>               git config git-p4.skipSubmitEditCheck true &&
> -             P4EDITOR=touch P4USER=alice P4PASSWD=secret git p4 commit 
> --preserve-user &&
> +             P4EDITOR="test-chmtime +5" P4USER=alice P4PASSWD=secret &&
> +             git p4 commit --preserve-user &&

I think this hunk is wrong; we need to either change && to \ to make
it a single logical line that exports three environment variables
only to "git p4 commit --preserve-user", or insert "export P4EDITOR
P4USER P4PASSWD &&" between these two lines.

The latter seems to be what the remainder of the test is doing, so
I'd fix this up to mimick them.

Sorry for not catching it in the earlier review.

Thanks.

> @@ -69,7 +70,7 @@ test_expect_success 'refuse to preserve users without 
> perms' '
>               git config git-p4.skipSubmitEditCheck true &&
>               echo "username-noperms: a change by alice" >>file1 &&
>               git commit --author "Alice <al...@example.com>" -m "perms: a 
> change by alice" file1 &&
> -             P4EDITOR=touch P4USER=bob P4PASSWD=secret &&
> +             P4EDITOR="test-chmtime +5" P4USER=bob P4PASSWD=secret &&
>               export P4EDITOR P4USER P4PASSWD &&
>               test_must_fail git p4 commit --preserve-user &&
>               ! git diff --exit-code HEAD..p4/master
--
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