[1.8.0] Change branch --set-uptream to take an argument
- From
Jay Soffian <jaysoffian@gmail.com>
- Date
- Feb 1, 2011, 06:57 UTC
- Message-ID
- <AANLkTinUn2SMijphe3EmPMVOOwBjPB5ffFwwqZVxQmW0@mail.gmail.com>
Proposal:
Currently it is very easy to misinvoke --set-upstream if you assume it takes an argument:
e.g.
(master)$ git branch --set-upstream origin/master Branch origin/master set up to track local branch master.
In order to make its usage unambiguous, and to allow it to be used w/o specifying the current branch, require it to take an argument like so:
(master)$ git branch --set-upstream=origin/master
(I've misinvoked it so often, I've had to train myself to always invoke it this way: git branch master --set-upstream origin/master)
Risks:
Hands which have become trained to use it as it currently is, scripts, etc.
Migration plan:
Introduce the new syntax to the man page and git branch for 1.7.x and emit a warning whenever the current syntax is used. In 1.8, break the current syntax.
(Though I'm not sure whether the options parser allows for both --set-upstream and --set-upstream=<arg>)
j.