diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 13d1d826c20293c26c739c70c0a36ed48bbb41d1..52094e78dcd63cd7dc1ce166450c403fc32efbac 100755 (executable)
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
test_expect_success 'fetch must not resolve short remote name' '
cd "$D" &&
- git-update-ref refs/remotes/six/HEAD HEAD
+ git update-ref refs/remotes/six/HEAD HEAD
mkdir six &&
cd six &&
'
+test_expect_success 'refuse to fetch into the current branch' '
+
+ test_must_fail git fetch . side:master
+
+'
+
+test_expect_success 'fetch into the current branch with --update-head-ok' '
+
+ git fetch --update-head-ok . side:master
+
+'
+
test_done