Skip to content

Commit a48ebe9

Browse files
sivaraamgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e2bbd0c commit a48ebe9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/branch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ static void copy_or_rename_branch(const char *oldname, const char *newname, int
507507

508508
if (recovery) {
509509
if (copy)
510-
warning(_("Copied a misnamed branch '%s' away"),
510+
warning(_("Created a copy of a misnamed branch '%s'"),
511511
oldref.buf + 11);
512512
else
513513
warning(_("Renamed a misnamed branch '%s' away"),

0 commit comments

Comments
 (0)