mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
branch: error message checking out a branch in use
Let's update the error message we show when the user tries to check out
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:
committed by
Junio C Hamano
parent
92edf61870
commit
2a499264d3
2
branch.c
2
branch.c
@@ -838,7 +838,7 @@ void die_if_checked_out(const char *branch, int ignore_current_worktree)
|
||||
|
||||
if (is_shared_symref(worktrees[i], "HEAD", branch)) {
|
||||
skip_prefix(branch, "refs/heads/", &branch);
|
||||
die(_("'%s' is already checked out at '%s'"),
|
||||
die(_("'%s' is already used by worktree at '%s'"),
|
||||
branch, worktrees[i]->path);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user