diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-10-14 15:32:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-10-17 11:26:20 -0700 |
commit | b0ad11ea165e07308fc02a5091efbe2e2d22237c (patch) | |
tree | f5c94bd5fe1e1af1afc472c1123e3aa2f9ee70a0 /t/t5520-pull.sh | |
parent | 8ee5d73137f355c21e8d4db365ae8d301e067395 (diff) | |
download | git-b0ad11ea165e07308fc02a5091efbe2e2d22237c.tar.gz |
pull: allow "git pull origin $something:$current_branch" into an unborn branch
Some misguided documents floating on the Net suggest this sequence:
mkdir newdir && cd newdir
git init
git remote add origin $url
git pull origin master:master
"git pull" has known about misguided "pull" that lets the underlying fetch
update the current branch for a long time. It also has known about
"git pull origin master" into a branch yet to be born.
These two workarounds however were not aware of the existence of each
other and did not work well together. This fixes it.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5520-pull.sh')
-rwxr-xr-x | t/t5520-pull.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 997b2db827..725771fac1 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -29,6 +29,18 @@ test_expect_success 'checking the results' ' diff file cloned/file ' +test_expect_success 'pulling into void using master:master' ' + mkdir cloned-uho && + ( + cd cloned-uho && + git init && + git pull .. master:master + ) && + test -f file && + test -f cloned-uho/file && + test_cmp file cloned-uho/file +' + test_expect_success 'test . as a remote' ' git branch copy master && |