From: "Santi Béjar" <sbejar@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git help: sort commands by topi
Date: Mon, 18 Feb 2008 18:16:00 +0100 [thread overview]
Message-ID: <8aa486160802180916t3807d505g9ed85c18d8884649@mail.gmail.com> (raw)
In-Reply-To: <7vlk5ipo3c.fsf@gitster.siamese.dyndns.org>
On Feb 18, 2008 11:15 AM, Junio C Hamano <gitster@pobox.com> wrote:
> "Santi Bejar" <sbejar@gmail.com> writes:
> > diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
> > index a2913c2..ec623dd 100755
> > --- a/generate-cmdlist.sh
> > +++ b/generate-cmdlist.sh
> > @@ -3,22 +3,36 @@
> > echo "/* Automatically generated by $0 */
> > struct cmdname_help
> > {
> > - char name[16];
> > + char name[23];
> > char help[80];
> > + char topic[22];
> > + char subtopic[10];
> > };
>
> These limits are very magic. If you are generating them in the
> script perhaps you would want to count bytes?
>
They were already there. Maybe in a cleanup patch.
> I dunno. Honestly, I am not very interested in this patch
> myself.
>
> Side Note: my not being interested does not mean I
> strongly oppose to its inclusion (I do not even care).
> It is just that I won't be the one who will be pushing
> for its inclusion, and you would want supporters other
> than me to push for it.
OK.
>
> > -static struct cmdname_help common_cmds[] = {"
> > +struct topicname_help
> > +{
> > + char name[23];
> > + char subtopic[10];
> > + char help[80];
> > +};
>
> Likewise.
>
> > -sed -n -e 's/^git-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt |
> > -sort |
> > -while read cmd
> > +static struct cmdname_help cmd_list[] = {"
> > +
> > +sed -n -e 's/^git-\([^ ]*\)\(.*\)$/\1\2/p' command-list.txt |
> > +grep -v deprecated | sort |
> > +while read cmd topic subtopic
>
> I do not like this pipeline to send output of sed to an _overly_
> loose grep. What happens when we introduce "git-deprecated"
> command later?
I'll look at it.
[...]
> > ${
> > x
> > - s/.*git-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
> > + s/.*git-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1",/
> > p
> > }' "Documentation/git-$cmd.txt"
> > + echo "\"$topic\", \"$subtopic\" },"
>
> Breaks nicely indented entries like:
>
> {"add", "Add file contents...
>
Sorry, but I do not undestand this.
[...]
> > diff --git a/topic-list.txt b/topic-list.txt
> > new file mode 100644
> > index 0000000..2ba11a9
> > --- /dev/null
> > +++ b/topic-list.txt
> > @@ -0,0 +1,12 @@
> > +# List of known git topics.
> > +# topic name help
> > +common The most commonly used commands
> > +mainporcelain Main porcelain commands
> > ...
> > +synchelpers Synching helper commands
> > +purehelpers Internal helper commands
>
> I wonder if this can be shared with the section headings of
> Documentation/git.txt; either generate the section headings from
> this file, or generate this file from the section headings.
I'll look at it.
Thanks for the review.
Santi
prev parent reply other threads:[~2008-02-18 17:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-17 14:48 [PATCH] git help: sort commands by topi Santi Bejar
2008-02-18 10:15 ` Junio C Hamano
2008-02-18 17:16 ` Santi Béjar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8aa486160802180916t3807d505g9ed85c18d8884649@mail.gmail.com \
--to=sbejar@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).