OSDN Git Service

branch: update warning message shown when copying a misnamed branch
authorKaartic Sivaraam <kaartic.sivaraam@gmail.com>
Sat, 18 Nov 2017 17:26:47 +0000 (22:56 +0530)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Dec 2017 23:06:43 +0000 (15:06 -0800)
commita48ebe9724b01e53f23e2a44a85f52237aaf5c34
tree478653f0a2b807cadbe669efc74bfc7774b1f1cf
parente2bbd0cc4c1b661cc04620a6704003793b190e7e
branch: update warning message shown when copying a misnamed branch

When a user tries to rename a branch that has a "bad name" (e.g.,
starts with a '-') then we warn them that the misnamed branch has
been renamed "away". A similar message is shown when trying to create
a copy of a misnamed branch even though it doesn't remove the misnamed
branch. This is not correct and may confuse the user.

So, update the warning message shown to be more precise that only a copy
of the misnamed branch has been created. It's better to show the warning
message than not showing it at all as it makes the user aware of the
presence of a misnamed branch.

Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/branch.c