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/ >