branch: error message deleting a branch in use

Let's update the error message we show when the user tries to delete a
branch which is being used in another worktree, following the guideline
reasoned in 4970bedef2 (branch: update the message to refuse touching a
branch in-use, 2023-07-21).

Signed-off-by: Rubén Justo <rjusto@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Rubén Justo
2023-08-07 22:42:36 +02:00
committed by Junio C Hamano
parent 4970bedef2
commit 92edf61870
2 changed files with 14 additions and 2 deletions

View File

@ -262,7 +262,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,
const char *path;
if ((path = branch_checked_out(name))) {
error(_("Cannot delete branch '%s' "
"checked out at '%s'"),
"used by worktree at '%s'"),
bname.buf, path);
ret = 1;
continue;