]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5510-fetch.sh
Merge branch 'ea/blame-use-oideq'
[thirdparty/git.git] / t / t5510-fetch.sh
index 2a1abe91f0fd34b7929aa636ab43542c6e45ea54..759aec9305e46abb7f5ab3da5a9b99a7502a7d3b 100755 (executable)
@@ -543,16 +543,18 @@ test_expect_success 'fetch into the current branch with --update-head-ok' '
 
 '
 
-test_expect_success 'fetch --dry-run does not touch FETCH_HEAD' '
-       rm -f .git/FETCH_HEAD &&
-       git fetch --dry-run . &&
-       ! test -f .git/FETCH_HEAD
+test_expect_success 'fetch --dry-run does not touch FETCH_HEAD, but still prints what would be written' '
+       rm -f .git/FETCH_HEAD err &&
+       git fetch --dry-run . 2>err &&
+       ! test -f .git/FETCH_HEAD &&
+       grep FETCH_HEAD err
 '
 
-test_expect_success '--no-write-fetch-head does not touch FETCH_HEAD' '
-       rm -f .git/FETCH_HEAD &&
-       git fetch --no-write-fetch-head . &&
-       ! test -f .git/FETCH_HEAD
+test_expect_success '--no-write-fetch-head does not touch FETCH_HEAD, and does not print what would be written' '
+       rm -f .git/FETCH_HEAD err &&
+       git fetch --no-write-fetch-head . 2>err &&
+       ! test -f .git/FETCH_HEAD &&
+       ! grep FETCH_HEAD err
 '
 
 test_expect_success '--write-fetch-head gets defeated by --dry-run' '