git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] worktree: fix order of arguments in error message

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Nov 20, 2020, 16:24 UTC
Message-ID
<CAPig+cS7SEARwoBn25SsxhkvdJfDe56FyVjDGk+sJq2kXfDbjQ@mail.gmail.com>
In-Reply-To
<1d740e0d4fc08a9f420373c6cd0a554b3b4b1f40.1605883395.git.matheus.bernardino@usp.br>

On Fri, Nov 20, 2020 at 10:09 AM Matheus Tavares <matheus.bernardino@usp.br> wrote:

> `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.

Thanks. This problem was introduced quite recently by d179af679b (worktree: generalize candidate worktree path validation, 2020-06-10).

> Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
> ---
> -               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);
The fix is obviously correct. For what it's worth, this patch is:
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Previous: Matheus Tavares
Message 2 of 2 in “worktree: fix order of arguments in error message”
  1. worktree: fix order of arguments in error messageMatheus Tavares, Nov 20, 2020
  2. Eric SunshineNov 20, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.