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

Re: [PATCH] Update the usage bundle string.

From
Thiago Farina <tfransosi@gmail.com>
Date
Sep 17, 2009, 16:16 UTC
Message-ID
<a4c8a6d00909170916u6ba05e36u3b65cc6d9bd726fd@mail.gmail.com>
In-Reply-To
<vpqbpl9woac.fsf@bauges.imag.fr>

On Thu, Sep 17, 2009 at 1:04 PM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:

Show 36 quoted lines
> Johannes Sixt <j.sixt@viscovery.net> writes:
>
>> Thiago Farina schrieb:
>>
>>> +static const char builtin_bundle_usage[] = "\
>>> +  git bundle create <file> <git-rev-list args>\n\
>>> +  git bundle verify <file>\n\
>>> +  git bundle list-heads <file> [refname...]\n\
>>> +  git bundle unbundle <file> [refname...]";
>>
>> You indent the usage text. Do other commands do that, too? If you resend,
>> it may be worth using this style:
>>
>> static const char builtin_bundle_usage[] =
>>       "git bundle create <file> <git-rev-list args>\n"
>>       "git bundle verify <file>\n"
>
> I like aligned usage strings, like:
>
> $ git stash -h
> Usage: git stash list [<options>]
>   or: git stash show [<stash>]
>   or: git stash drop [-q|--quiet] [<stash>]
>   or: git stash ( pop | apply ) [--index] [-q|--quiet] [<stash>]
>   or: git stash branch <branchname> [<stash>]
>   or: git stash [save [-k|--keep-index] [-q|--quiet] [<message>]]
>   or: git stash clear
>
> or
>
> $ git branch -h |& head -n 4
> usage: git branch [options] [-r | -a] [--merged | --no-merged]
>   or: git branch [options] [-l] [-f] <branchname> [<start-point>]
>   or: git branch [options] [-r] (-d | -D) <branchname>
>   or: git branch [options] (-m | -M) [<oldbranch>] <newbranch>
>
I like and prefer this style too. I can use it in my patch, like:
$ git bundle -h
usage: git bundle create <file> <git-rev-list args>
  or: git bundle verify <file>
  or: git bundle list-heads <file> [refname...]
  or: git bundle unbundle <file> [refname...]
instead of:
usage: git bundle create <file> <git-rev-list args>
          git bundle verify <file>
          git bundle list-heads <file> [refname...]
          git bundle unbundle <file> [refname...]
Show 14 quoted lines
> but Git isn't very consistant here:
>
> $ git bisect -h |& head  -n 6
> Usage: git bisect [help|start|bad|good|skip|next|reset|visualize|replay|log|run]
>
> git bisect help
>        print this long help message.
> git bisect start [<bad> [<good>...]] [--] [<pathspec>...]
>        reset bisect state and start bisection.
>
> --
> Matthieu Moy
> http://www-verimag.imag.fr/~moy/
>
Previous: Matthieu Moy
Message 5 of 5 in “Update the usage bundle string.”
  1. Update the usage bundle string.Thiago Farina, Sep 16, 2009
  2. Johannes SixtSep 17, 2009
  3. Thiago FarinaSep 17, 2009
  4. Matthieu MoySep 17, 2009
  5. Thiago FarinaSep 17, 2009

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.