git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Soffian <jaysoffian@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [1.8.0] Change branch --set-uptream to take an argument
Date: Tue, 1 Feb 2011 01:57:03 -0500	[thread overview]
Message-ID: <AANLkTinUn2SMijphe3EmPMVOOwBjPB5ffFwwqZVxQmW0@mail.gmail.com> (raw)

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.

             reply	other threads:[~2011-02-01  6:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01  6:57 Jay Soffian [this message]
2011-02-01  9:01 ` [1.8.0] Change branch --set-uptream to take an argument Matthieu Moy
2011-02-01 21:14   ` Jay Soffian
2011-02-04  8:54     ` Stefan Haller
2011-02-01 21:15 ` Junio C Hamano
2011-02-01 21:27   ` Jay Soffian
2011-02-02  4:08     ` Miles Bader
2011-02-02  4:18       ` Jay Soffian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTinUn2SMijphe3EmPMVOOwBjPB5ffFwwqZVxQmW0@mail.gmail.com \
    --to=jaysoffian@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).