All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Todd Zullinger <tmz@pobox.com>
Cc: git@vger.kernel.org,  Patrick Steinhardt <ps@pks.im>,
	 "brian m. carlson" <sandals@crustytoothpaste.net>
Subject: Re: [PATCH 1/3] doc: update howto-index.sh for .adoc extensions
Date: Fri, 28 Feb 2025 05:55:31 -0800	[thread overview]
Message-ID: <xmqqy0xq41ik.fsf@gitster.g> (raw)
In-Reply-To: <20250228034713.203461-2-tmz@pobox.com> (Todd Zullinger's message of "Thu, 27 Feb 2025 22:47:04 -0500")

Todd Zullinger <tmz@pobox.com> writes:

> The .txt extensions were changed to .adoc in 1f010d6bdf (doc: use .adoc
> extension for AsciiDoc files, 2025-01-20).  This left broken links in
> the generated howto-index.html.
>
> Signed-off-by: Todd Zullinger <tmz@pobox.com>
> ---
>  Documentation/howto/howto-index.sh | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/Documentation/howto/howto-index.sh b/Documentation/howto/howto-index.sh
> index eecd123a93..ace49830a8 100755
> --- a/Documentation/howto/howto-index.sh
> +++ b/Documentation/howto/howto-index.sh
> @@ -9,9 +9,9 @@ people describing how they use Git in their workflow.
>  
>  EOF
>  
> -for txt
> +for adoc
>  do
> -	title=$(expr "$txt" : '.*/\(.*\)\.txt$')
> +	title=$(expr "$adoc" : '.*/\(.*\)\.adoc$')
>  	from=$(sed -ne '
>  	/^$/q
>  	/^From:[ 	]/{
> @@ -21,7 +21,7 @@ do
>  		s/^/by /
>  		p
>  	}
> -	' "$txt")
> +	' "$adoc")
>  
>  	abstract=$(sed -ne '
>  	/^Abstract:[ 	]/{
> @@ -39,13 +39,13 @@ do
>  		x
>  		p
>  		q
> -	}' "$txt")
> +	}' "$adoc")
>  
> -	if grep 'Content-type: text/asciidoc' >/dev/null $txt
> +	if grep 'Content-type: text/asciidoc' >/dev/null $adoc

This is an existing "Huh?" and should not be touched in this patch
but it is somewhat inconsistent that everywhere else "$adoc" is
prepared to have $IFS whitespaces in it (even though none of our
files do), but this single reference is not.  We may #leftoverbit
want to make it consistent after the dust settles.

>  	then
> -		file=$(expr "$txt" : '\(.*\)\.txt$').html
> +		file=$(expr "$adoc" : '\(.*\)\.adoc$').html
>  	else
> -		file="$txt"
> +		file="$adoc"
>  	fi
>  
>  	echo "* link:howto/$(basename "$file")[$title] $from

Looks quite sane.  Thanks.

  reply	other threads:[~2025-02-28 13:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-28  3:47 [PATCH 0/3] doc: txt -> adoc fixes Todd Zullinger
2025-02-28  3:47 ` [PATCH 1/3] doc: update howto-index.sh for .adoc extensions Todd Zullinger
2025-02-28 13:55   ` Junio C Hamano [this message]
2025-02-28  3:47 ` [PATCH 2/3] contrib/contacts: rename .txt to .adoc Todd Zullinger
2025-02-28  8:13   ` Patrick Steinhardt
2025-02-28 13:57     ` Todd Zullinger
2025-02-28 18:47       ` Junio C Hamano
2025-03-01 15:34         ` Todd Zullinger
2025-02-28  3:47 ` [PATCH 3/3] contrib/subtree: " Todd Zullinger
2025-02-28  8:13   ` Patrick Steinhardt
2025-02-28 13:50     ` Todd Zullinger
2025-02-28 14:09       ` Patrick Steinhardt
2025-02-28 18:34         ` Junio C Hamano
2025-02-28 13:45 ` [PATCH 0/3] doc: txt -> adoc fixes Junio C Hamano
2025-03-01 15:36 ` [PATCH v2 " Todd Zullinger
2025-03-01 15:36   ` [PATCH v2 1/3] doc: update howto-index.sh for .adoc extensions Todd Zullinger
2025-03-01 15:36   ` [PATCH v2 2/3] contrib/contacts: rename .txt to .adoc Todd Zullinger
2025-03-01 15:36   ` [PATCH v2 3/3] contrib/subtree: " Todd Zullinger
2025-03-01 18:02   ` [PATCH v2 0/3] doc: txt -> adoc fixes Junio C Hamano
2025-03-01 18:20   ` Junio C Hamano
2025-03-01 18:25     ` [PATCH v2 4/3] doc: fix build-docdep.perl Junio C Hamano
2025-03-01 19:41       ` Todd Zullinger

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=xmqqy0xq41ik.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    --cc=sandals@crustytoothpaste.net \
    --cc=tmz@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 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.