[PATCH v2 04/14] t/t5505-remote: remove dependency on $origin_url
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Jun 22, 2013, 07:58 UTC
- Message-ID
- <1371887901-5659-5-git-send-email-artagnon@gmail.com>
- In-Reply-To
- <1371887901-5659-1-git-send-email-artagnon@gmail.com>
In the tests "migrate a remote from named file in $GIT_DIR/{remotes,branches}", we are only checking that a configuration is migrated successfully; it has no correspondence with whether or not those values do something sensible with other git operations (fetch/push). Therefore, there is no need to determine $origin_url: just substitute it with the constant value "quux".
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> --- t/t5505-remote.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index d688662..13199d1 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -733,14 +733,13 @@ test_expect_success 'rename a remote with name prefix of other remote' ' ' cat >remotes_origin <<-EOF -URL: $(pwd)/one +URL: quux Push: refs/heads/master:refs/heads/upstream Pull: refs/heads/master:refs/heads/origin EOF test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' ' git clone one five && - origin_url=$(pwd)/one && ( cd five && git remote remove origin && @@ -748,7 +747,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' ' cat ../remotes_origin >.git/remotes/origin && git remote rename origin origin && test_path_is_missing .git/remotes/origin && - test "$(git config remote.origin.url)" = "$origin_url" && + 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" ) @@ -756,14 +755,13 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' ' test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' ' git clone one six && - origin_url=$(pwd)/one && ( cd six && git remote rm origin && - echo "$origin_url" >.git/branches/origin && + echo "quux" >.git/branches/origin && git remote rename origin origin && test_path_is_missing .git/branches/origin && - test "$(git config remote.origin.url)" = "$origin_url" && + test "$(git config remote.origin.url)" = "quux" && test "$(git config remote.origin.fetch)" = "refs/heads/master:refs/heads/origin" && test "$(git config remote.origin.push)" = "HEAD:refs/heads/master" )
-- 1.8.3.1.498.gacf2885