Merge branch 'tg/t0021-racefix'
[gitweb.git] / t / t5510-fetch.sh
index e98d90dd9baf644bf2013aea51a91eab4e9ef73c..34b486f1a48b08f483d36c6421e47323977db9d0 100755 (executable)
@@ -902,6 +902,29 @@ test_expect_success C_LOCALE_OUTPUT 'fetch compact output' '
        test_cmp expect actual
 '
 
+test_expect_success '--no-show-forced-updates' '
+       mkdir forced-updates &&
+       (
+               cd forced-updates &&
+               git init &&
+               test_commit 1 &&
+               test_commit 2
+       ) &&
+       git clone forced-updates forced-update-clone &&
+       git clone forced-updates no-forced-update-clone &&
+       git -C forced-updates reset --hard HEAD~1 &&
+       (
+               cd forced-update-clone &&
+               git fetch --show-forced-updates origin 2>output &&
+               test_i18ngrep "(forced update)" output
+       ) &&
+       (
+               cd no-forced-update-clone &&
+               git fetch --no-show-forced-updates origin 2>output &&
+               test_i18ngrep ! "(forced update)" output
+       )
+'
+
 setup_negotiation_tip () {
        SERVER="$1"
        URL="$2"
@@ -978,4 +1001,7 @@ test_expect_success '--negotiation-tip limits "have" lines sent with HTTP protoc
        check_negotiation_tip
 '
 
+# DO NOT add non-httpd-specific tests here, because the last part of this
+# test script is only executed when httpd is available and enabled.
+
 test_done