Skip to content

Commit 9b1dc1c

Browse files
vdyegitster
authored andcommittedSep 20, 2022
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 89c8048 commit 9b1dc1c

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@
181181
/git-verify-commit
182182
/git-verify-pack
183183
/git-verify-tag
184+
/git-version
184185
/git-web--browse
185186
/git-whatchanged
186187
/git-worktree

‎Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,7 @@ BUILT_INS += git-show$X
818818
BUILT_INS += git-stage$X
819819
BUILT_INS += git-status$X
820820
BUILT_INS += git-switch$X
821+
BUILT_INS += git-version$X
821822
BUILT_INS += git-whatchanged$X
822823

823824
# what 'all' will build but not install in gitexecdir

‎command-list.txt

+1
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ git-var plumbinginterrogators
199199
git-verify-commit ancillaryinterrogators
200200
git-verify-pack plumbinginterrogators
201201
git-verify-tag ancillaryinterrogators
202+
git-version ancillaryinterrogators
202203
git-whatchanged ancillaryinterrogators complete
203204
git-worktree mainporcelain
204205
git-write-tree plumbingmanipulators

0 commit comments

Comments
 (0)
Please sign in to comment.