summaryrefslogtreecommitdiff
path: root/builtin/worktree.c
diff options
context:
space:
mode:
authorMatheus Tavares <matheus.bernardino@usp.br>2020-11-20 15:09:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-21 21:31:34 (GMT)
commitb86339b12bc7ef179e2ce4096a5d1ede257ca4d2 (patch)
treedbd8ce2ff0efe8e0cf38a23989f4270dd05b7dec /builtin/worktree.c
parent898f80736c75878acc02dc55672317fcc0e0a5a6 (diff)
downloadgit-b86339b12bc7ef179e2ce4096a5d1ede257ca4d2.zip
git-b86339b12bc7ef179e2ce4096a5d1ede257ca4d2.tar.gz
git-b86339b12bc7ef179e2ce4096a5d1ede257ca4d2.tar.bz2
worktree: fix order of arguments in error message
`git worktree add` (without --force) errors out when given a path that is already registered as a worktree and the path is missing on disk. But the `cmd` and `path` strings are switched on the error message. Let's fix that. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/worktree.c')
-rw-r--r--builtin/worktree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 99abaee..8f39cb2 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -304,9 +304,9 @@ static void check_candidate_path(const char *path,
}
if (locked)
- die(_("'%s' is a missing but locked worktree;\nuse '%s -f -f' to override, or 'unlock' and 'prune' or 'remove' to clear"), cmd, path);
+ die(_("'%s' is a missing but locked worktree;\nuse '%s -f -f' to override, or 'unlock' and 'prune' or 'remove' to clear"), path, cmd);
else
- die(_("'%s' is a missing but already registered worktree;\nuse '%s -f' to override, or 'prune' or 'remove' to clear"), cmd, path);
+ die(_("'%s' is a missing but already registered worktree;\nuse '%s -f' to override, or 'prune' or 'remove' to clear"), path, cmd);
}
static int add_worktree(const char *path, const char *refname,