From 41c1709a56da5dd4f4f68268a91d2c55370826cd Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 8 Aug 2012 14:32:37 -0400 Subject: check-docs: mention gitweb specially Like gitk, gitweb is not listed in the usual Makefile variables and must be fed to check-docs specially. Otherwise check-docs thinks it is documented but removed. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 15d13197d4..5e773cd431 100644 --- a/Makefile +++ b/Makefile @@ -2805,7 +2805,7 @@ endif ### Check documentation # check-docs:: - @(for v in $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git gitk; \ + @(for v in $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git gitk gitweb; \ do \ case "$$v" in \ git-merge-octopus | git-merge-ours | git-merge-recursive | \ @@ -2855,7 +2855,7 @@ check-docs:: documented,gitworkflows | \ sentinel,not,matching,is,ok ) continue ;; \ esac; \ - case " $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git gitk " in \ + case " $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git gitk gitweb " in \ *" $$cmd "*) ;; \ *) echo "removed but $$how: $$cmd" ;; \ esac; \ -- cgit v1.2.1 From 1b7b522c2698ced2a60d5c26bf5b16e01bd45a75 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 8 Aug 2012 14:34:33 -0400 Subject: check-docs: update non-command documentation list The check-docs target looks at Documentation/git*txt and complains if any entry does not have a matching command. Therefore we need to explicitly ignore any entries which are not meant to describe a command (like gitattributes.txt). This list has grown stale over time, so let's bring it up to date. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 5e773cd431..41d9db86ae 100644 --- a/Makefile +++ b/Makefile @@ -2853,6 +2853,9 @@ check-docs:: documented,git-bisect-lk2009 | \ documented,git-remote-helpers | \ documented,gitworkflows | \ + documented,gitcredentials | \ + documented,gitnamespaces | \ + documented,gitweb.conf | \ sentinel,not,matching,is,ok ) continue ;; \ esac; \ case " $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git gitk gitweb " in \ -- cgit v1.2.1 From 63b903962a201fb6c618051b2c7f1366035f27be Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 8 Aug 2012 14:34:39 -0400 Subject: command-list: add git-sh-i18n This is in the same category as git-sh-setup. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- command-list.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/command-list.txt b/command-list.txt index ec64cacf06..1da8f0d270 100644 --- a/command-list.txt +++ b/command-list.txt @@ -114,6 +114,7 @@ git-show mainporcelain common git-show-branch ancillaryinterrogators git-show-index plumbinginterrogators git-show-ref plumbinginterrogators +git-sh-i18n purehelpers git-sh-setup purehelpers git-stash mainporcelain git-status mainporcelain common -- cgit v1.2.1 From c6632eba5a14791b1fa376cd59eb334c29732327 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 8 Aug 2012 14:34:49 -0400 Subject: command-list: mention git-credential-* helpers These commands were never added to the command-list. Adding them makes "make check-docs" run without complaint. While we're at it, let's capitalize the first letter of their one-line summaries to match the rest of the git manpages. The credential-cache--daemon command is somewhat special. It is already ignored by check-docs because it contains a "--", marking it as a non-interesting implementation detail. It is, in fact, documented, but since the documentation basically just redirects you to a more appropriate command anyway, let's explicitly omit it so it is not mentioned in git(1). Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/git-credential-cache--daemon.txt | 2 +- Documentation/git-credential-cache.txt | 2 +- Documentation/git-credential-store.txt | 2 +- command-list.txt | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Documentation/git-credential-cache--daemon.txt b/Documentation/git-credential-cache--daemon.txt index 11edc5a173..d15db42d43 100644 --- a/Documentation/git-credential-cache--daemon.txt +++ b/Documentation/git-credential-cache--daemon.txt @@ -3,7 +3,7 @@ git-credential-cache--daemon(1) NAME ---- -git-credential-cache--daemon - temporarily store user credentials in memory +git-credential-cache--daemon - Temporarily store user credentials in memory SYNOPSIS -------- diff --git a/Documentation/git-credential-cache.txt b/Documentation/git-credential-cache.txt index f3d09c5d51..eeff5fa989 100644 --- a/Documentation/git-credential-cache.txt +++ b/Documentation/git-credential-cache.txt @@ -3,7 +3,7 @@ git-credential-cache(1) NAME ---- -git-credential-cache - helper to temporarily store passwords in memory +git-credential-cache - Helper to temporarily store passwords in memory SYNOPSIS -------- diff --git a/Documentation/git-credential-store.txt b/Documentation/git-credential-store.txt index 31093467d1..b27c03c361 100644 --- a/Documentation/git-credential-store.txt +++ b/Documentation/git-credential-store.txt @@ -3,7 +3,7 @@ git-credential-store(1) NAME ---- -git-credential-store - helper to store credentials on disk +git-credential-store - Helper to store credentials on disk SYNOPSIS -------- diff --git a/command-list.txt b/command-list.txt index 1da8f0d270..7e8cfec29d 100644 --- a/command-list.txt +++ b/command-list.txt @@ -26,6 +26,8 @@ git-commit-tree plumbingmanipulators git-config ancillarymanipulators git-count-objects ancillaryinterrogators git-credential purehelpers +git-credential-cache purehelpers +git-credential-store purehelpers git-cvsexportcommit foreignscminterface git-cvsimport foreignscminterface git-cvsserver foreignscminterface -- cgit v1.2.1 From cf6aaff3771916e71bac0ced545ec420b768f172 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 8 Aug 2012 16:56:04 -0400 Subject: check-docs: factor out command-list The check-docs command list is composed from several Makefile variables plus some special cases. Let's make the meaning of the list more obvious and avoid repeating ourselves by factoring it out. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 41d9db86ae..6ae868d764 100644 --- a/Makefile +++ b/Makefile @@ -2804,8 +2804,12 @@ endif ### Check documentation # +ALL_COMMANDS = $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) +ALL_COMMANDS += git +ALL_COMMANDS += gitk +ALL_COMMANDS += gitweb check-docs:: - @(for v in $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git gitk gitweb; \ + @(for v in $(ALL_COMMANDS); \ do \ case "$$v" in \ git-merge-octopus | git-merge-ours | git-merge-recursive | \ @@ -2858,7 +2862,7 @@ check-docs:: documented,gitweb.conf | \ sentinel,not,matching,is,ok ) continue ;; \ esac; \ - case " $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git gitk gitweb " in \ + case " $(ALL_COMMANDS) " in \ *" $$cmd "*) ;; \ *) echo "removed but $$how: $$cmd" ;; \ esac; \ -- cgit v1.2.1 From eb28501e15c069d61c7dd7601fad2655449ebb14 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 8 Aug 2012 16:56:42 -0400 Subject: check-docs: list git-gui as a command git-gui is already documented and mentioned in command-list, but adding it to the Makefile makes sure it is so. We also add its alias git-citool (which is also documented). As a result, we can drop them from the special case statement that avoids them being listed as "documented but does not exist". Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6ae868d764..4b3c36600c 100644 --- a/Makefile +++ b/Makefile @@ -2808,6 +2808,7 @@ ALL_COMMANDS = $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) ALL_COMMANDS += git ALL_COMMANDS += gitk ALL_COMMANDS += gitweb +ALL_COMMANDS += git-gui git-citool check-docs:: @(for v in $(ALL_COMMANDS); \ do \ @@ -2837,8 +2838,6 @@ check-docs:: ) | while read how cmd; \ do \ case "$$how,$$cmd" in \ - *,git-citool | \ - *,git-gui | \ *,git-help | \ documented,gitattributes | \ documented,gitignore | \ -- cgit v1.2.1 From 7d02b574f40b33d6abfecf8fed98cee94a738071 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 8 Aug 2012 16:57:13 -0400 Subject: check-docs: drop git-help special-case The check-docs target special-cases git-help to avoid mentioning it as "documented but removed". This dates back to the early implementation of git-help, when its code was simply included inside git.c. These days it is a full-fledged builtin (in builtin/help.c) and does not need special-casing. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 4b3c36600c..b9da51176b 100644 --- a/Makefile +++ b/Makefile @@ -2838,7 +2838,6 @@ check-docs:: ) | while read how cmd; \ do \ case "$$how,$$cmd" in \ - *,git-help | \ documented,gitattributes | \ documented,gitignore | \ documented,gitmodules | \ -- cgit v1.2.1 From 5fafce0b782dabc48e47828bde5478a15040298f Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 8 Aug 2012 16:57:52 -0400 Subject: check-docs: get documented command list from Makefile The current code tries to get a list of documented commands by doing "ls Documentation/git*txt" and culling a bunch of special cases from the result. Looking for "git-*.txt" would be more accurate, but would miss a few commands like "gitweb" and "gitk". Fortunately, Documentation/Makefile already knows what this list is, so we can just ask it. Annoyingly, we still have to post-process its output a little, since make will print extra cruft like "GIT-VERSION-FILE is up to date" to stdout. Now that our list is accurate, we can remove all of the ugly special-cases. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/Makefile | 3 +++ Makefile | 26 ++------------------------ 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 063fa696c9..cf5916fe8b 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -344,4 +344,7 @@ require-htmlrepo:: quick-install-html: require-htmlrepo '$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(HTML_REPO) $(DESTDIR)$(htmldir) +print-man1: + @for i in $(MAN1_TXT); do echo $$i; done + .PHONY: FORCE diff --git a/Makefile b/Makefile index b9da51176b..51b3c6fc9c 100644 --- a/Makefile +++ b/Makefile @@ -2832,34 +2832,12 @@ check-docs:: sed -e '/^#/d' \ -e 's/[ ].*//' \ -e 's/^/listed /' command-list.txt; \ - ls -1 Documentation/git*txt | \ + $(MAKE) -C Documentation print-man1 | \ + grep '\.txt$$' | \ sed -e 's|Documentation/|documented |' \ -e 's/\.txt//'; \ ) | while read how cmd; \ do \ - case "$$how,$$cmd" in \ - documented,gitattributes | \ - documented,gitignore | \ - documented,gitmodules | \ - documented,gitcli | \ - documented,git-tools | \ - documented,gitcore-tutorial | \ - documented,gitcvs-migration | \ - documented,gitdiffcore | \ - documented,gitglossary | \ - documented,githooks | \ - documented,gitrepository-layout | \ - documented,gitrevisions | \ - documented,gittutorial | \ - documented,gittutorial-2 | \ - documented,git-bisect-lk2009 | \ - documented,git-remote-helpers | \ - documented,gitworkflows | \ - documented,gitcredentials | \ - documented,gitnamespaces | \ - documented,gitweb.conf | \ - sentinel,not,matching,is,ok ) continue ;; \ - esac; \ case " $(ALL_COMMANDS) " in \ *" $$cmd "*) ;; \ *) echo "removed but $$how: $$cmd" ;; \ -- cgit v1.2.1