mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
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>
This commit is contained in:
parent
898f80736c
commit
b86339b12b
|
@ -304,9 +304,9 @@ static void check_candidate_path(const char *path,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (locked)
|
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
|
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,
|
static int add_worktree(const char *path, const char *refname,
|
||||||
|
|
Loading…
Reference in a new issue