switch: fix errors and comments related to -c and -C
commit7c16ef7577c21c043e8f2779e1d9dd657dd2dace
authorDenton Liu <liu.denton@gmail.com>
Thu, 30 Apr 2020 11:54:57 +0000 (30 07:54 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Apr 2020 20:43:31 +0000 (30 13:43 -0700)
tree6c22562fc3df6a8ce5595b1f2a51d06bddf4a7e6
parentb86a4be245d0ba077c97c6ab6b1cdbeb9dcc1342
switch: fix errors and comments related to -c and -C

In d787d311db (checkout: split part of it to new command 'switch',
2019-03-29), the `git switch` command was created by extracting the
common functionality of cmd_checkout() in checkout_main(). However, in
b7b5fce270 (switch: better names for -b and -B, 2019-03-29), the branch
creation and force creation options for 'switch' were changed to -c and
-C, respectively. As a result of this, error messages and comments that
previously referred to `-b` and `-B` became invalid for `git switch`.

For error messages that refer to `-b` and `-B`, use a format string
instead so that `-c` and `-C` can be printed when `git switch` is
invoked.

Reported-by: Robert Simpson
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/checkout.c