All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fernando Ramos <greenfoo@u92.eu>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: fr/vimdiff-layout (was: What's cooking in git.git (Mar 2022, #05; Wed, 23))
Date: Sat, 26 Mar 2022 23:55:13 +0100	[thread overview]
Message-ID: <Yj+Z0T2TShqH99a/@zacax395.localdomain> (raw)
In-Reply-To: <220326.86k0cgk83t.gmgdl@evledraar.gmail.com>

> It looks like it's emitting a new warning from the "Makefile" in
> check-docs:
> 	
> 	$ (make clean && make check-docs) >/dev/null 2>&1; make check-docs
> 	make -C Documentation lint-docs
> 	make[1]: Entering directory '/home/avar/g/git/Documentation'
> 	make[1]: Nothing to be done for 'lint-docs'.
> 	make[1]: Leaving directory '/home/avar/g/git/Documentation'
> 	removed but documented: git-difftool--vimdiff
> 	removed but documented: git-mergetool--vimdiff
> 	removed but documented: git-version

Looking at how the Makefile works it looks like this error is triggered
because...

  1. I have created these two new files:
     - Documentation/git-difftool--vimdiff.txt
     - Documentation/git-mergetool--vimdiff.txt

  2. None of them are real programs (such as "git-clone") or scripts (such as
     "git-mergetool--lib.sh")

All the other "Documentation/*.txt" files are associated to "something" that
can be executed, but not these two (they are only meant to be accessed from "git
help" / "man").

Options I can think of:

  A) Ignore the warning message

  B) Remove these two files and add all this documentation to an already
     existing one (maybe "Documentation/git-mergetool--lib.txt")

  C) Create a new variable in the Makefile to contain a list of "documentation
     aliases" that do not correspond to a "real" command, so that they can be
     filtered out when testing for documentation problems.

In other to implement (C) we could do something like this:

> diff --git a/Makefile b/Makefile
> index 70f0a004e7..db8a1c8025 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -597,6 +597,7 @@ TEST_BUILTINS_OBJS =
>  TEST_OBJS =
>  TEST_PROGRAMS_NEED_X =
>  THIRD_PARTY_SOURCES =
> +DOC_ALIASES =
> 
>  # Having this variable in your environment would break pipelines because
>  # you cause "cd" to echo its destination to stdout.  It can also take
> @@ -1228,6 +1229,11 @@ THIRD_PARTY_SOURCES += compat/regex/%
>  THIRD_PARTY_SOURCES += sha1collisiondetection/%
>  THIRD_PARTY_SOURCES += sha1dc/%
> 
> +# DOC ALIASES is a list of topics you can call "git help" on but they are no
> +# real commands or scripts you can execute
> +DOC_ALIASES += git-difftool--vimdiff
> +DOC_ALIASES += git-mergetool--vimdiff
> +
>  # xdiff and reftable libs may in turn depend on what is in libgit.a
>  GITLIBS = common-main.o $(LIB_FILE) $(XDIFF_LIB) $(REFTABLE_LIB) $(LIB_FILE)
>  EXTLIBS =
> @@ -3355,7 +3361,7 @@ check-docs::
>                     -e 's/\.txt//'; \
>         ) | while read how cmd; \
>         do \
> -               case " $(patsubst %$X,%,$(ALL_COMMANDS) $(BUILT_INS) $(EXCLUDED_PROGRAMS)) " in \
> +               case " $(patsubst %$X,%,$(ALL_COMMANDS) $(BUILT_INS) $(EXCLUDED_PROGRAMS) $(DOC_ALIASES)) " in \
>                 *" $$cmd "*)    ;; \
>                 *) echo "removed but $$how: $$cmd" ;; \
>                 esac; \

Let me know what you think. Thanks!



  reply	other threads:[~2022-03-26 22:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24  3:13 What's cooking in git.git (Mar 2022, #05; Wed, 23) Junio C Hamano
2022-03-25 13:38 ` ab/commit-plug-leaks (was: What's cooking in git.git (Mar 2022, #05; Wed, 23)) Ævar Arnfjörð Bjarmason
2022-03-26 16:05 ` fr/vimdiff-layout " Ævar Arnfjörð Bjarmason
2022-03-26 22:55   ` Fernando Ramos [this message]
2022-03-27  0:29     ` fr/vimdiff-layout Junio C Hamano
2022-03-27 13:18       ` [PATCH] tests: do roundtrip builtin doc & sanity checking Æ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=Yj+Z0T2TShqH99a/@zacax395.localdomain \
    --to=greenfoo@u92.eu \
    --cc=avarab@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 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.