Re: [1.8.0] forbid full fetchspecs in git-pull

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 31, 2011 at 10:55:59PM +0100, Thomas Rast wrote:
> Proposal:
>
> git-pull inherits the full fetchspec invocation syntax from git-fetch,
> so that you can do e.g.
>
>  git pull origin master:master
>
> usually shooting yourself in the foot in the process.  See e.g.
>
>  http://thread.gmane.org/gmane.comp.version-control.git/130819/focus=130879 [item 1]
>
> Prohibit this invocation, i.e., disallow any second argument to
> git-pull that contains ':'.

Hmm... I have always thought about "git pull repo refspec" as
"git fetch repo refspec && git merge FETCH_HEAD"
and "git fetch" refuses to fetch into the current branch of a non-bare
repository, so I expected "git merge" to fail in this case too, but it
succeeded though with some warning that fetch updated the current
branch head. I think it is inconsistent and should be fixed, and that
will fix the mentioned confusion as well.

As to disallowing ':' in refspec completely, I am not so sure... Not
that I think it is very useful, but also I don't see how it can hurt
someone provided that the target branch cannot be the current branch.


Dmitry
--
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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]