On Tue, 20 Oct 2009 20:23:06 +0200 Thomas Rast <trast@xxxxxxxxxxxxxxx> wrote: Hi Thomas, > git-pull has historically accepted full fetchspecs, meaning that you > could do > > git pull $repo A:B > > which would simultaneously fetch the remote branch A into the local > branch B and merge B into HEAD. This got especially confusing if B > was checked out. New users variously mistook pull for fetch or read > that command as "merge the remote A into my B", neither of which is > correct. > > Since the above usage should be very rare and can be done with > separate calls to fetch and merge, we just disallow full fetchspecs in > git-pull. It is however a handy shortcut to be able to specify the full refspec and specify where you want the head stored locally. It seems a shame to throw away that functionality because of one confusing case. Wouldn't it be better to test of the confusing case and instead error out if the local refname is already checked out? [...] > diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh > index dd2ee84..a566a99 100755 > --- a/t/t5520-pull.sh > +++ b/t/t5520-pull.sh > @@ -29,18 +29,6 @@ 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 && > -- > Instead of removing this test it should be modified or replaced with a test that ensures the new functionality operates correctly. In this case that would mean checking that using a full refspec errors out. Cheers, Sean -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html