Re: [PATCH 13/16] t/t5505-remote: test multiple push/pull in remotes-file

2013-06-22 Thread Ramkumar Ramachandra
Eric Sunshine wrote:
> Broken &&-chain.

Good eyes, thanks.
--
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


Re: [PATCH 13/16] t/t5505-remote: test multiple push/pull in remotes-file

2013-06-21 Thread Eric Sunshine
On Fri, Jun 21, 2013 at 7:12 AM, Ramkumar Ramachandra
 wrote:
> Extend the test "migrate a remote from named file in $GIT_DIR/remotes"
> to test that multiple "Push:" and "Pull:" lines in the remotes-file
> works as expected.
>
> Signed-off-by: Ramkumar Ramachandra 
> ---
> diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
> index 06ed381..5497a23 100755
> --- a/t/t5505-remote.sh
> +++ b/t/t5505-remote.sh
> @@ -684,8 +686,18 @@ test_expect_success 'migrate a remote from named file in 
> $GIT_DIR/remotes' '
> git remote rename origin origin &&
> test_path_is_missing .git/remotes/origin &&
> test "$(git config remote.origin.url)" = "quux" &&
> -   test "$(git config remote.origin.push)" = 
> "refs/heads/master:refs/heads/upstream" &&
> -   test "$(git config remote.origin.fetch)" = 
> "refs/heads/master:refs/heads/origin"
> +   cat >push_expected <<-\EOF

Broken &&-chain.

> +   refs/heads/master:refs/heads/upstream
> +   refs/heads/master:refs/heads/upstream2
> +   EOF
> +   cat >fetch_expected <<-\EOF

Ditto.

> +   refs/heads/master:refs/heads/origin
> +   refs/heads/master:refs/heads/origin2
> +   EOF
> +   git config --get-all remote.origin.fetch >push_actual &&
> +   git config --get-all remote.origin.fetch >fetch_actual &&
> +   test_cmp push_expected push_actual &&
> +   test_cmp fetch_expected fetch_actual &&
> )
>  '
>
> --
--
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


[PATCH 13/16] t/t5505-remote: test multiple push/pull in remotes-file

2013-06-21 Thread Ramkumar Ramachandra
Extend the test "migrate a remote from named file in $GIT_DIR/remotes"
to test that multiple "Push:" and "Pull:" lines in the remotes-file
works as expected.

Signed-off-by: Ramkumar Ramachandra 
---
 t/t5505-remote.sh | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 06ed381..5497a23 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -671,7 +671,9 @@ test_expect_success 'rename a remote with name prefix of 
other remote' '
 cat > remotes_origin << EOF
 URL: quux
 Push: refs/heads/master:refs/heads/upstream
+Push: refs/heads/master:refs/heads/upstream2
 Pull: refs/heads/master:refs/heads/origin
+Pull: refs/heads/master:refs/heads/origin2
 EOF
 
 test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '
@@ -684,8 +686,18 @@ test_expect_success 'migrate a remote from named file in 
$GIT_DIR/remotes' '
git remote rename origin origin &&
test_path_is_missing .git/remotes/origin &&
test "$(git config remote.origin.url)" = "quux" &&
-   test "$(git config remote.origin.push)" = 
"refs/heads/master:refs/heads/upstream" &&
-   test "$(git config remote.origin.fetch)" = 
"refs/heads/master:refs/heads/origin"
+   cat >push_expected <<-\EOF
+   refs/heads/master:refs/heads/upstream
+   refs/heads/master:refs/heads/upstream2
+   EOF
+   cat >fetch_expected <<-\EOF
+   refs/heads/master:refs/heads/origin
+   refs/heads/master:refs/heads/origin2
+   EOF
+   git config --get-all remote.origin.fetch >push_actual &&
+   git config --get-all remote.origin.fetch >fetch_actual &&
+   test_cmp push_expected push_actual &&
+   test_cmp fetch_expected fetch_actual &&
)
 '
 
-- 
1.8.3.1.499.g7ad3486.dirty

--
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