summaryrefslogtreecommitdiff
path: root/Documentation/git-branch.txt
diff options
context:
space:
mode:
authorKaartic Sivaraam <kaarticsivaraam91196@gmail.com>2017-08-17 08:24:24 +0530
committerJunio C Hamano <gitster@pobox.com>2017-08-17 13:33:20 -0700
commit52668846ea2d41ffbd87cda7cb8e492dea9f2c4d (patch)
treed56d2e72aa8c2a781854a7e8be7f8b8660254d36 /Documentation/git-branch.txt
parent93a6b3f234555006448bfbbaf5ecc3ea19faaa16 (diff)
downloadgit-52668846ea2d41ffbd87cda7cb8e492dea9f2c4d.tar.gz
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>
Diffstat (limited to 'Documentation/git-branch.txt')
-rw-r--r--Documentation/git-branch.txt6
1 files changed, 2 insertions, 4 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 81bd0a7b77..ba805749ec 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -195,10 +195,8 @@ start-point is either a local or remote-tracking branch.
branch.autoSetupMerge configuration variable is true.
--set-upstream::
- If specified branch does not exist yet or if `--force` has been
- given, acts exactly like `--track`. Otherwise sets up configuration
- like `--track` would when creating the branch, except that where
- branch points to is not changed.
+ As this option had confusing syntax, it is no longer supported.
+ Please use `--track` or `--set-upstream-to` instead.
-u <upstream>::
--set-upstream-to=<upstream>::