summaryrefslogtreecommitdiff
path: root/t/t5510-fetch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-10-22 00:58:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-10-22 00:58:21 (GMT)
commitca6c06b2efe2f55c498670efcb419bce35678e03 (patch)
tree741239f028d57d825b8bbd66df8271ad0576bbe0 /t/t5510-fetch.sh
parenta157400c972bbdeab2b5629658c99839c855f5ab (diff)
parentb0ad11ea165e07308fc02a5091efbe2e2d22237c (diff)
downloadgit-ca6c06b2efe2f55c498670efcb419bce35678e03.zip
git-ca6c06b2efe2f55c498670efcb419bce35678e03.tar.gz
git-ca6c06b2efe2f55c498670efcb419bce35678e03.tar.bz2
Merge branch 'js/maint-fetch-update-head'
* js/maint-fetch-update-head: pull: allow "git pull origin $something:$current_branch" into an unborn branch Fix fetch/pull when run without --update-head-ok Conflicts: t/t5510-fetch.sh
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-xt/t5510-fetch.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 9aae496..9e679b4 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -323,4 +323,16 @@ test_expect_success 'auto tag following fetches minimum' '
)
'
+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