Files
git/builtin
Kaartic Sivaraam 52668846ea builtin/branch: stop supporting the "--set-upstream" option
The '--set-upstream' option of branch was deprecated in b347d06b
("branch: deprecate --set-upstream and show help if we detect
possible mistaken use", 2012-08-30) and has been planned for removal
ever since.

In order to prevent "--set-upstream" on a command line from being taken as
an abbreviated form of "--set-upstream-to", explicitly catch "--set-upstream"
option and die, instead of just removing it from the list of options.

Before this change, an attempt to use "--set-upstream" resulted in:

    $ git branch
    * master

    $ git branch --set-upstream origin/master
    The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-to
    Branch origin/master set up to track local branch master.

    $ echo $?
    0

    $ git branch
    * master
      origin/master

With this change, the behaviour becomes like this:

    $ git branch
    * master

    $ git branch --set-upstream origin/master
    fatal: the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead.

    $ echo $?
    128

    $ git branch
    * master

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-17 13:33:20 -07:00
..
2017-06-24 14:28:41 -07:00
2017-07-17 13:54:51 -07:00
2016-11-22 13:55:20 -08:00
2017-06-24 14:28:41 -07:00
2017-06-24 14:28:41 -07:00
2017-08-11 13:26:58 -07:00
2017-06-24 14:28:41 -07:00
2017-06-24 14:28:41 -07:00
2017-08-11 13:27:01 -07:00
2017-06-24 14:28:41 -07:00
2017-06-24 14:28:41 -07:00
2017-06-24 14:28:41 -07:00
2017-03-31 08:33:56 -07:00
2017-08-11 13:27:00 -07:00
2017-08-11 13:26:58 -07:00
2017-08-11 13:27:01 -07:00
2017-06-24 14:28:41 -07:00
2017-06-24 14:28:41 -07:00
2017-07-17 14:54:56 -07:00
2017-06-15 12:56:22 -07:00
2017-07-10 13:42:51 -07:00
2017-08-11 13:26:56 -07:00
2017-07-13 16:14:54 -07:00
2017-06-24 14:28:41 -07:00
2017-06-24 14:28:41 -07:00
2017-08-11 13:26:56 -07:00
2017-07-10 13:42:51 -07:00
2017-06-24 14:28:41 -07:00
2017-06-24 14:28:41 -07:00
2017-06-24 14:28:41 -07:00
2017-01-23 18:51:56 -08:00
2017-06-24 14:28:41 -07:00
2017-06-24 14:28:41 -07:00
2017-06-24 14:28:41 -07:00