diff options
Diffstat (limited to 'branch.c')
-rw-r--r-- | branch.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -6,6 +6,7 @@ #include "gettext.h" #include "hex.h" #include "object-name.h" +#include "path.h" #include "refs.h" #include "refspec.h" #include "remote.h" @@ -470,7 +471,7 @@ int validate_new_branchname(const char *name, struct strbuf *ref, int force) if ((path = branch_checked_out(ref->buf))) die(_("cannot force update the branch '%s' " - "checked out at '%s'"), + "used by worktree at '%s'"), ref->buf + strlen("refs/heads/"), path); return 1; @@ -837,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); } } |