pretty: add support for separator option in %(trailers)
[gitweb.git] / t / t5551-http-fetch-smart.sh
index 71535631d3bf7e494a778301fb81f926b1a74132..8630b0cc39045f913987463a36388bcd72d6e248 100755 (executable)
@@ -207,7 +207,7 @@ test_expect_success 'cookies stored in http.cookiefile when http.savecookies set
        cat >cookies.txt <<-\EOF &&
        127.0.0.1       FALSE   /smart_cookies/ FALSE   0       othername       othervalue
        EOF
-       cat >expect_cookies.txt <<-\EOF &&
+       sort >expect_cookies.txt <<-\EOF &&
 
        127.0.0.1       FALSE   /smart_cookies/ FALSE   0       othername       othervalue
        127.0.0.1       FALSE   /smart_cookies/repo.git/info/   FALSE   0       name    value
@@ -215,7 +215,7 @@ test_expect_success 'cookies stored in http.cookiefile when http.savecookies set
        git config http.cookiefile cookies.txt &&
        git config http.savecookies true &&
        git ls-remote $HTTPD_URL/smart_cookies/repo.git master &&
-       tail -3 cookies.txt >cookies_tail.txt &&
+       tail -3 cookies.txt | sort >cookies_tail.txt &&
        test_cmp expect_cookies.txt cookies_tail.txt
 '
 
@@ -381,6 +381,21 @@ test_expect_success 'using fetch command in remote-curl updates refs' '
        test_cmp expect actual
 '
 
+test_expect_success 'fetch by SHA-1 without tag following' '
+       SERVER="$HTTPD_DOCUMENT_ROOT_PATH/server" &&
+       rm -rf "$SERVER" client &&
+
+       git init "$SERVER" &&
+       test_commit -C "$SERVER" foo &&
+
+       git clone $HTTPD_URL/smart/server client &&
+
+       test_commit -C "$SERVER" bar &&
+       git -C "$SERVER" rev-parse bar >bar_hash &&
+       git -C client -c protocol.version=0 fetch \
+               --no-tags origin $(cat bar_hash)
+'
+
 test_expect_success 'GIT_REDACT_COOKIES redacts cookies' '
        rm -rf clone &&
        echo "Set-Cookie: Foo=1" >cookies &&