Re: [1.8.0] Change branch --set-uptream to take an argument
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Feb 1, 2011, 09:01 UTC
- Message-ID
- <vpqzkqg5dsq.fsf@bauges.imag.fr>
- In-Reply-To
- <AANLkTinUn2SMijphe3EmPMVOOwBjPB5ffFwwqZVxQmW0@mail.gmail.com>
Jay Soffian <jaysoffian@gmail.com> writes:
> Currently it is very easy to misinvoke --set-upstream if you assume it > takes an argument:
Your proposal sounds interesting, but I'd like to see something more global: right now, some commands take a --track option and other take a --set-upstream. In short, I'd like to see this --track deprecated (since it's not actually about remote-tracking ...).
> (Though I'm not sure whether the options parser allows for both > --set-upstream and --set-upstream=<arg>)
There are already many instances of this. When <arg> is mandatory, you can write either --option <arg> or --option=<arg> (like "git log --grep pattern" Vs "git log --grep=pattern"), and when <arg> is optional, you can write either --option alone, or --option=<arg> (like "git diff --color-words" and "git diff --color-words=.").
-- Matthieu Moy http://www-verimag.imag.fr/~moy/