Merge branch 'rj/branch-in-use-error-message'

A message written in olden time prevented a branch from getting
checked out saying it is already checked out elsewhere, but these
days, we treat a branch that is being bisected or rebased just like
a branch that is checked out and protect it.  Rephrase the message
to say that the branch is in use.

* rj/branch-in-use-error-message:
  branch: error message checking out a branch in use
  branch: error message deleting a branch in use
This commit is contained in:
Junio C Hamano
2023-08-24 09:32:32 -07:00
5 changed files with 18 additions and 5 deletions

View File

@ -261,7 +261,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;