From: Jakub Narebski <jnareb@gmail.com>
To: Jeff King <peff@peff.net>
Cc: "Thomas Rast" <trast@student.ethz.ch>,
git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Jonathan Nieder" <jrnieder@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>,
"Sverre Rabbelier" <srabbelier@gmail.com>
Subject: Re: [RFC PATCH v2 0/3] Documentation: refactor config variable descriptions
Date: Mon, 25 Oct 2010 14:44:06 +0200 [thread overview]
Message-ID: <201010251444.08780.jnareb@gmail.com> (raw)
In-Reply-To: <20101022155307.GB5554@sigill.intra.peff.net>
On Fri, 22 Oct 2010, Jeff King wrote:
> On Fri, Oct 22, 2010 at 07:02:28AM +0200, Thomas Rast wrote:
>
> > This resurrects (finally) the earlier attempt at
> >
> > http://mid.gmane.org/cover.1280169048.git.trast@student.ethz.ch
> >
> > It tries the inverse approach: teaching the script how to find config
> > variable blocks in each manpage, and then linking them from the main
> > list. (Obviously just inserting them into the main list could also
> > work.)
> >
> > In other words, it attempts to push out the "original" documentation
> > of each variable from the main list to the individual manpage, which
> > is exactly opposite from v1.
>
> Thanks for working on this.
[...]
> I have two comments on the approach:
>
> 1. It looks like you're more or less just parsing "::" list keys from
> all of the manpages. This seems somewhat fragile, as there could be
> other non-config lists. Can we at least restrict it to
> CONFIGURATION sections? It would be nice if we could put in some
> kind of semantic markup, but I'm not sure how painful that would be
> with asciidoc (we could always resort to comments in the source,
> but that would probably get unreadable quickly).
The regexp for catching config variables is quite strict, but tests
done with my version of script modifier further to check for
CONFIGURATION-like sections (matching /^Config/) shown that we have
problems either way.
1. Without checking for CONFIGURATION sections, we have what are
probably false positives from gitmodules.txt:
submodule.<name>.path::
submodule.<name>.url::
submodule.<name>.update::
submodule.<name>.ignore::
I say *probably* because while gitmodules manpage describes those
variables as going into .gitmodules, if I understand it correctly
those variables can got to .git/config as an override.
2. With checking for CONFIGURATION-like, we would miss the following
configuration variables:
http.getanyfile:: (for git-http-backend, in 'SERVICES')
http.uploadpack:: (for git-http-backend, in 'SERVICES')
http.receivepack:: (for git-http-backend, in 'SERVICES')
These are in git-http-backend manpage, in 'SERVICES' section, which
probably should be named then 'CONFIGURING SERVICES'.
BTW, CONFIGURATION-like means:
* Configuration
* CONFIGURATION
but also
* CONFIG FILE-ONLY OPTIONS
* CONFIGURATION FILE
* Configuration Mechanism
* CONFIG VARIABLES
* CONFIGURATION VARIABLES
* Configuring database backend
>
> 2. You recursively follow includes via include::. This means that the
> make rule is not accurate. E.g., try:
>
> rm cmds-mainporcelain.txt config-vars.txt
> make config-vars.txt
>
> which should fail, as we actually depend on cmds-mainporcelain.txt.
> Doing it accurately and automatically would mean making .depend
> files for make.
We do that: see 'doc.dep' target in Documentation/Makefile. We just
need for this target to also add dependencies for config-vars.txt
(perhaps separate mode for make-config-list.perl, or perhaps
build-docdep.perl should be config-vars-src.txt aware...).
>
> But I wonder if the recursive lookup is really required. Some of
> the includes with config files can just go away (e.g.,
> merge-config.txt is included only by config-vars-src.txt and
> git-merge.txt; it can just be merged straight into git-merge.txt
> once this system exists).
merge-config.txt is the only included file with config variables.
Other includes does not contain config variables. And because
merge-config.txt is also included in config-vars-src.txt, therefore
the whole recursive lookup is not necessary.
Note however that make-config-list.perl only creates minimal documentation,
just link(s) to appropriate mapage(s). Include-ing merge-config.txt both
in git-merge.txt and config-vars-src.txt means that we have merg config
variables defined in git-config(1) manpage, which I think is nice to have.
> Others, like pretty-formats.txt, should,
> IMHO, get their own user-visible page. Right now with your script
> you get[1]:
>
> format.pretty::
> The default pretty format for log/show/whatchanged command,
> See linkgit:git-log[1], linkgit:git-show[1],
> linkgit:git-whatchanged[1].
>
> but I would rather see[2]:
>
> format.pretty::
> See linkgit:gitpretty[7].
Actually the above block describing `format.pretty` is from beginning in
config-vars-src.txt, and is not added / created by said script.
>
> [1]: I assume the single line of block description is an error in
> your script.
Hmmm?
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2010-10-25 12:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-22 5:02 [RFC PATCH v2 0/3] Documentation: refactor config variable descriptions Thomas Rast
2010-10-22 5:02 ` [RFC PATCH v2 3/3] Documentation: move format.* documentation to format-patch Thomas Rast
[not found] ` <c3f621cd062b2c4f80aa2e8dadcfddbc042aefaa.1287690696.git.trast@student.ethz.ch>
2010-10-22 8:18 ` [RFC PATCH v2 1/3] Documentation: Move variables from config.txt to separate file Jakub Narebski
[not found] ` <8145782bddf60325909f328337cb76d25c4402cf.1287690696.git.trast@student.ethz.ch>
2010-10-22 6:19 ` [RFC PATCH v2 2/3] Documentation: complete config list from other manpages Jakub Narebski
2010-10-22 14:31 ` Jakub Narebski
2010-10-23 22:24 ` [PATCH] " Thomas Rast
2010-10-23 22:30 ` Jakub Narebski
2010-10-24 14:36 ` Jakub Narebski
2010-10-24 20:44 ` [RFC PATCH v3 2/3] " Jakub Narebski
2010-10-24 20:55 ` [RFC PATCH v3 2/3 (amend)] " Jakub Narebski
2010-10-22 15:17 ` [RFC PATCH v2 0/3] Documentation: refactor config variable descriptions Jakub Narebski
2010-10-22 15:53 ` Jeff King
2010-10-24 1:24 ` Thomas Rast
2010-10-25 15:04 ` Jeff King
2010-10-25 12:44 ` Jakub Narebski [this message]
2010-10-25 15:11 ` Jeff King
2010-10-25 15:49 ` Jakub Narebski
2010-10-27 10:56 ` Jakub Narebski
2010-11-02 13:42 ` Jens Lehmann
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=201010251444.08780.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
--cc=srabbelier@gmail.com \
--cc=trast@student.ethz.ch \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.