Merge branch 'pe/pull-rebase-v-q'
[gitweb.git] / t / t0300-credentials.sh
index 8621ab036f91d0b7dcf96a1964611b8cafc3adbd..538ea5fb1c27bf5e4f9c4a0268f219f5d6d6e9c5 100755 (executable)
@@ -8,10 +8,13 @@ test_expect_success 'setup helper scripts' '
        cat >dump <<-\EOF &&
        whoami=`echo $0 | sed s/.*git-credential-//`
        echo >&2 "$whoami: $*"
-       while IFS== read key value; do
+       OIFS=$IFS
+       IFS==
+       while read key value; do
                echo >&2 "$whoami: $key=$value"
                eval "$key=$value"
        done
+       IFS=$OIFS
        EOF
 
        write_script git-credential-useless <<-\EOF &&
@@ -79,6 +82,9 @@ test_expect_success 'credential_fill passes along metadata' '
        host=example.com
        path=foo.git
        --
+       protocol=ftp
+       host=example.com
+       path=foo.git
        username=one
        password=two
        --
@@ -210,6 +216,8 @@ test_expect_success 'match configured credential' '
        host=example.com
        path=repo.git
        --
+       protocol=https
+       host=example.com
        username=foo
        password=bar
        --
@@ -222,6 +230,8 @@ test_expect_success 'do not match configured credential' '
        protocol=https
        host=bar
        --
+       protocol=https
+       host=bar
        username=askpass-username
        password=askpass-password
        --
@@ -236,6 +246,8 @@ test_expect_success 'pull username from config' '
        protocol=https
        host=example.com
        --
+       protocol=https
+       host=example.com
        username=foo
        password=askpass-password
        --
@@ -249,6 +261,8 @@ test_expect_success 'http paths can be part of context' '
        host=example.com
        path=foo.git
        --
+       protocol=https
+       host=example.com
        username=foo
        password=bar
        --
@@ -262,6 +276,9 @@ test_expect_success 'http paths can be part of context' '
        host=example.com
        path=foo.git
        --
+       protocol=https
+       host=example.com
+       path=foo.git
        username=foo
        password=bar
        --