[1.8.0] forbid full fetchspecs in git-pull

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

 



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 ':'.


History:

I submitted a patch ages ago:

  http://article.gmane.org/gmane.comp.version-control.git/130822

Sean seemed to be the only one in favour of the old behaviour, but I
was too lazy to push it past him.  (There were some issues with the
test as well.)

I honestly still don't see a valid use-case for the full syntax, let
alone having seen one in the wild; in cases where you are inclined to
do

  git pull origin foo:bar

you probably don't need 'bar' to begin with if you can use
'origin/foo' instead, assuming the previous proposal on remote-branch
updating is also included.


Risks:

It's an incompatibility, so scripts may break.


Migration plan:

None; disallow it at the 1.8.0 boundary.

If someone makes a good case why his hands are trained that way, we
might introduce a config variable instead.


-- 
Thomas Rast
trast@{inf,student}.ethz.ch
--
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]