git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Thomas Rast <trast@student.ethz.ch>
Cc: git@vger.kernel.org, "Jeff King" <peff@peff.net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH 2/24] Documentation: Add variable-substitution script
Date: Mon, 26 Jul 2010 14:51:44 -0500	[thread overview]
Message-ID: <20100726195144.GC1043@burratino> (raw)
In-Reply-To: <049043aa444288fd9409a3706fe3190fd679cb7d.1280169048.git.trast@student.ethz.ch>

Thomas Rast wrote:

>   ./subst-config.perl <vars> <in> <out>
> 
> It first reads <vars> for variable-documenting blocks.  A line
> consisting of '<name>::' starts the block for <name>, except inside a
> '--' delimited block (which is used to generate sub-lists).  A block
> extends until the first blank line, which is what asciidoc also looks
> for.
> 
> Then it copies from <in> to <out>, substituting lines of the form
> 
>   @@CONFIG(<name>)@@
> 
> with the documentation block for <name>.

Neat.  Thanks for picking this up.  

I would like to make the git-config(1) man page more like the command
list in git(1) and less like a concatenation of CONFIGURATION
sections, but regardless, this is a good first step.

> diff --git a/Documentation/config-vars.txt b/Documentation/config-vars.txt
> index b82fada..3fcefe9 100644
> --- a/Documentation/config-vars.txt
> +++ b/Documentation/config-vars.txt
> @@ -689,6 +689,7 @@ diff.mnemonicprefix::
>  	standard "a/" and "b/" depending on what is being compared.  When
>  	this configuration is in effect, reverse diff output also swaps
>  	the order of the prefixes:
> +
>  diff.noprefix::
>  	If set, 'git diff' does not show any source or destination prefix.
>  `git diff`;;

Does this have an effect on the resulting markup?  It looks like an
independent syntax fix.

> +++ b/Documentation/subst-config.perl
> @@ -0,0 +1,74 @@
[...]
> +if (!$rc or (!-r $varlist or !-r $input)) {
> +    print "$0 --varlist=<varlist> --input=<in> --output=<out>\n";
> +    exit 1;
> +}

So the commit message is out of date (the new usage is more clear,
anyway).

> +%.txt.cv : %.txt subst-config.perl config-vars.txt

The asciidoc markup is supposed to itself be suitable documentation.
Maybe eventually we will have to drop that pretence and generate .txt
files at build time.

Acked-by: Jonathan Nieder <jrnieder@gmail.com>

  reply	other threads:[~2010-07-26 19:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-26 18:48 [RFC PATCH 0/24] Documentation: refactor config variable descriptions Thomas Rast
2010-07-26 18:48 ` [PATCH 2/24] Documentation: Add variable-substitution script Thomas Rast
2010-07-26 19:51   ` Jonathan Nieder [this message]
2010-07-26 20:27     ` Ævar Arnfjörð Bjarmason
2010-07-26 21:17   ` Jakub Narebski
2010-07-26 21:49     ` Ævar Arnfjörð Bjarmason
2010-07-26 18:48 ` [PATCH 3-24/24] Documentation: include configuration options in manpages Thomas Rast
2010-07-26 19:55   ` Jonathan Nieder
2010-07-26 19:05 ` [RFC PATCH 0/24] Documentation: refactor config variable descriptions Ævar Arnfjörð Bjarmason
     [not found] ` <75c9db91f5ab43ebb60cace0d20389462a2ab02c.1280169048.git.trast@student.ethz.ch>
2010-07-26 19:38   ` [PATCH 1/24] Documentation: Move variables from config.txt to separate file Jonathan Nieder
2010-07-26 20:18     ` Ævar Arnfjörð Bjarmason
2010-07-27  6:48       ` Sverre Rabbelier
2010-07-28 17:23       ` Junio C Hamano
2010-07-26 22:25 ` [RFC PATCH 0/24] Documentation: refactor config variable descriptions Ævar Arnfjörð Bjarmason

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=20100726195144.GC1043@burratino \
    --to=jrnieder@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --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 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).