Skip to content

Commit 057ccba

Browse files
dschogitster
authored andcommitted
check-docs: really look at the documented commands again
As part of the `check-docs` target, we verify that commands that are documented are actually in the current list of commands to be built. However, this logic broke in 5fafce0 (check-docs: get documented command list from Makefile, 2012-08-08), when we tried to make the logic safer by not looking at the files in the worktree, but at the list of files to be generated in `Documentation/Makefile`. While this was the right thing to do, it failed to accommodate for the fact that `make -C Documentation/ print-man1`, unlike `ls Documentation/*.txt`, would *not* print lines starting with the prefix `Documentation/`. At long last, let's fix this. Note: This went undetected due to a funny side effect of the `ALL_PROGRAMS` variable starting with a space. That space, together with the extra space we inserted before `$(ALL_PROGRAMS)` in the case " $(ALL_PROGRAMS)" in *" $$cmd ") [...] construct, is responsible that this case arm is used when `cmd` is empty (which was clearly not intended to be the case). Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c3eaa0c commit 057ccba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3082,7 +3082,7 @@ check-docs::
30823082
-e 's/^/listed /' command-list.txt; \
30833083
$(MAKE) -C Documentation print-man1 | \
30843084
grep '\.txt$$' | \
3085-
sed -e 's|Documentation/|documented |' \
3085+
sed -e 's|^|documented |' \
30863086
-e 's/\.txt//'; \
30873087
) | while read how cmd; \
30883088
do \

0 commit comments

Comments
 (0)