git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Taylor Blau <me@ttaylorr.com>,
	Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH 1/1] check-docs: fix for setups where executables have an extension
Date: Mon, 25 Mar 2019 22:08:35 +0100 (STD)	[thread overview]
Message-ID: <nycvar.QRO.7.76.6.1903252206201.41@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <xmqqbm20ph45.fsf@gitster-ct.c.googlers.com>

Hi Junio,

On Sun, 24 Mar 2019, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > Sharp eyes, and a *very* good point. The double space is actually required
> > for this patch to work as intended. I added the following explanation to
> > the commit message:
> >
> >     Note that `$(ALL_COMMANDS)` starts with a space, and that is rather
> >     crucial for the `while read how cmd` loop: some of the input lines do
> >     not actually have the form `<how> <cmd>`, but only `<cmd>`, therefore
> >     `$cmd` evaluates to the empty string, and when we are looking for
> >     `* $cmd *` in ` $(ALL_COMMANDS)`, we do find it because the latter
> >     starts with a double space.
> >     In other words, the double space helps us skip the lines that list
> >     only a command.
>
> That sounds more like a bug in the existing set-up even before your
> patch (in fact, these lines are probably from 2007 or so, long
> before you started touching our top-level Makefile heavily).  If we
> want to ignore lines with only one token, I'd rather see it
> explicitly done, e.g.
>
> 	... generate data ... |
> 	while read how cmd
> 	do
> 		# skip a line with a single token
> 		case "$cmd" in "") continue ;; esac
>
> 		# is $cmd part of the known command list?
> 		case " $(ALL_COMMANDS) " in
> 		*" $cmd "*)	;; # skip
> 		*)	echo ... warning ... ;;
> 		esac
> 	done
>
> instead of relying on "if $cmd is empty, then SP + $cmd + SP makes
> double space, so let's have double space somewhere in the list of
> known commands" cuteness.

You are right, I should have root-caused it, it had a funny smell to it.

Turns out that we should not just skip those lines with a single token,
but instead fix the bug that prevents the `how` variable to be set to
`documented` in those cases, as had been intended all along.

I fixed the commit, and accompanied it with a bug fix for this, plus for
the fall-out bugs that had been hidden by this bug.

Ciao,
Dscho

  reply	other threads:[~2019-03-25 21:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-13 11:56 [PATCH 0/1] Fix make check-docs on Windows Johannes Schindelin via GitGitGadget
2019-03-13 11:56 ` [PATCH 1/1] check-docs: fix for setups where executables have an extension Johannes Schindelin via GitGitGadget
2019-03-14  1:54   ` Junio C Hamano
2019-03-22 18:43   ` Taylor Blau
2019-03-24 10:02     ` Johannes Schindelin
2019-03-24 12:54       ` Junio C Hamano
2019-03-25 21:08         ` Johannes Schindelin [this message]
2019-03-25 21:41 ` [PATCH v2 0/5] Fix make check-docs on Windows Johannes Schindelin via GitGitGadget
2019-03-25 21:41   ` [PATCH v2 1/5] docs: move gitremote-helpers into section 7 Johannes Schindelin via GitGitGadget
2019-03-25 21:41   ` [PATCH v2 3/5] check-docs: really look at the documented commands again Johannes Schindelin via GitGitGadget
2019-03-25 21:41   ` [PATCH v2 2/5] docs: do not document the `git remote-testgit` command Johannes Schindelin via GitGitGadget
2019-03-26 14:39     ` Ævar Arnfjörð Bjarmason
2019-03-27 22:23       ` Johannes Schindelin
2019-03-29 14:48         ` Johannes Schindelin
2019-03-25 21:41   ` [PATCH v2 4/5] check-docs: do not expect guide pages to correspond to commands Johannes Schindelin via GitGitGadget
2019-03-25 21:41   ` [PATCH v2 5/5] check-docs: fix for setups where executables have an extension Johannes Schindelin via GitGitGadget
2019-03-26 14:38   ` [PATCH v2 0/5] Fix make check-docs on Windows Johannes Schindelin

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.QRO.7.76.6.1903252206201.41@tvgsbejvaqbjf.bet \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).