aboutsummaryrefslogtreecommitdiff
path: root/rerere.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@elego.de>2012-08-30 19:23:13 +0200
committerJunio C Hamano <gitster@pobox.com>2012-08-30 12:07:39 -0700
commitb347d06bf097aca5effd07871adf4d0c8a7c55bd (patch)
tree64a5252be54daea24ec6685b0e9e13caf2a02650 /rerere.h
parentb84869ef14081b298a4ab825219221ccfcb2a3ba (diff)
downloadgit-b347d06bf097aca5effd07871adf4d0c8a7c55bd.tar.gz
git-b347d06bf097aca5effd07871adf4d0c8a7c55bd.tar.xz
branch: deprecate --set-upstream and show help if we detect possible mistaken use
This interface is error prone, and a better one (--set-upstream-to) exists. Add a message listing the alternatives and suggest how to fix a --set-upstream invocation in case the user only gives one argument which causes a local branch with the same name as a remote-tracking one to be created. The typical case is git branch --set-upstream origin/master when the user meant git branch --set-upstream master origin/master assuming that the current branch is master. Show a message telling the user how to undo their action and get what they wanted. For the command above, the message would be 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. If you wanted to make 'master' track 'origin/master', do this: git branch -d origin/master git branch --set-upstream-to origin/master Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'rerere.h')
0 files changed, 0 insertions, 0 deletions