Commit 7c16ef7
switch: fix errors and comments related to -c and -C
In d787d31 (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
b7b5fce (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>1 parent b86a4be commit 7c16ef7
1 file changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1487 | 1487 | | |
1488 | 1488 | | |
1489 | 1489 | | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
1490 | 1493 | | |
1491 | 1494 | | |
1492 | 1495 | | |
| |||
1530 | 1533 | | |
1531 | 1534 | | |
1532 | 1535 | | |
1533 | | - | |
| 1536 | + | |
| 1537 | + | |
1534 | 1538 | | |
1535 | 1539 | | |
1536 | 1540 | | |
| |||
1558 | 1562 | | |
1559 | 1563 | | |
1560 | 1564 | | |
1561 | | - | |
| 1565 | + | |
1562 | 1566 | | |
1563 | 1567 | | |
1564 | 1568 | | |
1565 | 1569 | | |
1566 | 1570 | | |
1567 | 1571 | | |
1568 | 1572 | | |
1569 | | - | |
| 1573 | + | |
1570 | 1574 | | |
1571 | 1575 | | |
1572 | 1576 | | |
| |||
1575 | 1579 | | |
1576 | 1580 | | |
1577 | 1581 | | |
1578 | | - | |
| 1582 | + | |
1579 | 1583 | | |
1580 | 1584 | | |
1581 | 1585 | | |
| |||
1766 | 1770 | | |
1767 | 1771 | | |
1768 | 1772 | | |
| 1773 | + | |
| 1774 | + | |
1769 | 1775 | | |
1770 | 1776 | | |
1771 | 1777 | | |
| |||
0 commit comments