1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-03-29 02:10:30 +01:00

version: fix builtin linking & documentation

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>
This commit is contained in:
Victoria Dye 2022-09-20 00:19:55 +00:00 committed by Junio C Hamano
parent 89c8048855
commit 9b1dc1c9d8
3 changed files with 3 additions and 0 deletions

1
.gitignore vendored
View File

@ -181,6 +181,7 @@
/git-verify-commit
/git-verify-pack
/git-verify-tag
/git-version
/git-web--browse
/git-whatchanged
/git-worktree

View File

@ -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

View 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