git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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/
Previous: Jay SoffianNext: Jay Soffian
Message 2 of 8 in “[1.8.0] Change branch --set-uptream to take an argument”
  1. Jay SoffianFeb 1, 2011
  2. Matthieu MoyFeb 1, 2011
  3. Jay SoffianFeb 1, 2011
  4. Stefan HallerFeb 4, 2011
  5. Junio C HamanoFeb 1, 2011
  6. Jay SoffianFeb 1, 2011
  7. Miles BaderFeb 2, 2011
  8. Jay SoffianFeb 2, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.