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

Re: [PATCH] Fix worktree usage message

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Oct 18, 2015, 16:51 UTC
Message-ID
<CAPig+cRXq9qonwPpWQdnrFkJgQQW0zDokXQhSvw5n07d7OpqdQ@mail.gmail.com>
In-Reply-To
<1445170530-31573-1-git-send-email-tigerkid001@gmail.com>
On Sun, Oct 18, 2015 at 8:15 AM, Sidhant Sharma <tigerkid001@gmail.com> wrote:
> Mark <branch> optional in worktree command line usage to maintain consistency with man pages.

Thanks for the patch. To clarify that it is the in-code usage string which is incorrect, rather than the man page, how about something like the following as commit message instead?

    worktree: usage: denote <branch> as optional with 'add'
    Although 1eb07d8 (worktree: add: auto-vivify new branch when
    <branch> is omitted, 2015-07-06) updated the documentation when
    <branch> became optional, it neglected to update the in-code
    usage message. Fix this oversight.
> Reported-by: ch3cooli@gmail.com
>
> Signed-off-by: Sidhant Sharma <tigerkid001@gmail.com>

Citing the reporter is a nice touch, but drop the blank line between it and the sign-off.

Show 16 quoted lines
> ---
> diff --git a/builtin/worktree.c b/builtin/worktree.c
> index 71bb770..33d2d37 100644
> --- a/builtin/worktree.c
> +++ b/builtin/worktree.c
> @@ -10,7 +10,7 @@
>  #include "refs.h"
>
>  static const char * const worktree_usage[] = {
> -       N_("git worktree add [<options>] <path> <branch>"),
> +       N_("git worktree add [<options>] <path> [<branch>]"),
>         N_("git worktree prune [<options>]"),
>         NULL
>  };
> --
> 2.6.2
Previous: Sidhant SharmaNext: Sidhant Sharma
Message 4 of 6 in “Fix worktree usage message”
  1. Fix worktree usage messageSidhant Sharma, Oct 18, 2015
  2. Kevin DaudtOct 18, 2015
  3. Fix worktree usage messageSidhant Sharma, Oct 18, 2015
  4. Eric SunshineOct 18, 2015
  5. worktree: usage: denote <branch> as optional with 'add'Sidhant Sharma, Oct 19, 2015
  6. Junio C HamanoOct 19, 2015

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.