]> git.ipfire.org Git - thirdparty/git.git/commitdiff
version: fix builtin linking & documentation
authorVictoria Dye <vdye@github.com>
Tue, 20 Sep 2022 00:19:55 +0000 (00:19 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Sep 2022 00:28:25 +0000 (17:28 -0700)
Like most builtins, 'version' is documented in a corresponding
'Documentation/git-version.txt' and can be invoked with 'git version'.
However, the 'check-docs' Makefile target showed that it was "removed but
documented: git-version." This was cause by the fact that it is not built as
a standalone 'git-version' executable, therefore appearing "removed" to
'check-docs'.

Without a precedent for documented builtins that aren't built into an
executable *or* any clear reason why a standalone 'git-version' shouldn't
exist, the 'check-docs' error appears to correctly identify an issue. To
correct that mismatch, add 'git-version' to the 'BUILT_INS' list in the root
Makefile (indicating that the 'cmd_version()' function appears in a file
that is *not* 'builtin/version.c'). Additionally, to avoid the "no link"
message in 'check-docs', list 'git-version' as an "ancilliaryinterrogator"
(like 'git help') in 'command-list.txt'.

Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.gitignore
Makefile
command-list.txt

index 3d1b880101e5eabf592920425fcca8500b6529bb..b3dcafcb3310e9f0bf6c03cd51741b8cb48831b9 100644 (file)
 /git-verify-commit
 /git-verify-pack
 /git-verify-tag
+/git-version
 /git-web--browse
 /git-whatchanged
 /git-worktree
index 35a07f80c5216099bd810843f390482c0efb89a3..cac3452edb90b473782ec0bda5782d133848d6ce 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -818,6 +818,7 @@ BUILT_INS += git-show$X
 BUILT_INS += git-stage$X
 BUILT_INS += git-status$X
 BUILT_INS += git-switch$X
+BUILT_INS += git-version$X
 BUILT_INS += git-whatchanged$X
 
 # what 'all' will build but not install in gitexecdir
index bb2e0a9214b486c12d2c2f643b1d2aeff52b6e3e..54b2a50f5f1dfeb2121f73a43417a7855d6fe1f4 100644 (file)
@@ -199,6 +199,7 @@ git-var                                 plumbinginterrogators
 git-verify-commit                       ancillaryinterrogators
 git-verify-pack                         plumbinginterrogators
 git-verify-tag                          ancillaryinterrogators
+git-version                             ancillaryinterrogators
 git-whatchanged                         ancillaryinterrogators          complete
 git-worktree                            mainporcelain
 git-write-tree                          plumbingmanipulators