summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorKaartic Sivaraam <kaartic.sivaraam@gmail.com>2017-11-18 17:26:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-12-07 23:06:43 (GMT)
commita48ebe9724b01e53f23e2a44a85f52237aaf5c34 (patch)
tree478653f0a2b807cadbe669efc74bfc7774b1f1cf /builtin
parente2bbd0cc4c1b661cc04620a6704003793b190e7e (diff)
downloadgit-a48ebe9724b01e53f23e2a44a85f52237aaf5c34.zip
git-a48ebe9724b01e53f23e2a44a85f52237aaf5c34.tar.gz
git-a48ebe9724b01e53f23e2a44a85f52237aaf5c34.tar.bz2
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>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/branch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/branch.c b/builtin/branch.c
index 4edef5b..ca9d8ab 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -507,7 +507,7 @@ static void copy_or_rename_branch(const char *oldname, const char *newname, int
if (recovery) {
if (copy)
- warning(_("Copied a misnamed branch '%s' away"),
+ warning(_("Created a copy of a misnamed branch '%s'"),
oldref.buf + 11);
else
warning(_("Renamed a misnamed branch '%s' away"),