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

[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.
Next: Matthieu Moy
Message 1 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.