{"thread":{"id":"50926","subject":"[PATCH 0/7] Assorted Documentation-related fixes","startedAt":"2019-04-12T12:00:34Z","lastAt":"2019-04-29T12:28:44Z","messageCount":41,"participants":["Johannes Schindelin via GitGitGadget","Eric Sunshine","Junio C Hamano","Jeff King","Josh Steadmon","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":7},"messages":[{"id":"373737","messageId":"pull.168.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":null,"subject":"[PATCH 0/7] Assorted Documentation-related fixes","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-12T12:00:31Z","receivedAt":"2019-04-12T12:00:34Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"While working on better support for make check-docs on Windows, I noticed a\ncouple more things, e.g. some \"commands\" were reported as being listed but\nnot built, e.g. gitcli (i.e. the parts of command-list.txt that are marked\nas \"guide\").\n\nThis patch series cleans up those loose ends: after this, make check-docs \nreports no issues on Windows.\n\nJohannes Schindelin (7):\n  remote-testgit: move it into the support directory for t5801\n  help -a: do not list commands that are excluded from the build\n  check-docs: do not pretend that commands are listed which are excluded\n  docs: exclude documentation for commands that have been excluded\n  check-docs: do not bother checking for legacy scripts' documentation\n  test-tool: handle the `-C <directory>` option just like `git`\n  Turn `git serve` into a test helper\n\n .gitignore                                    |  1 -\n Documentation/.gitignore                      |  1 +\n Documentation/Makefile                        |  3 +\n Makefile                                      | 58 +++++++++++--------\n builtin.h                                     |  1 -\n generate-cmdlist.sh                           | 10 +++-\n git.c                                         |  1 -\n builtin/serve.c => t/helper/test-serve-v2.c   |  7 ++-\n t/helper/test-tool.c                          | 20 +++++++\n t/helper/test-tool.h                          |  1 +\n t/t5701-git-serve.sh                          | 32 +++++-----\n t/t5702-protocol-v2.sh                        |  5 +-\n t/t5703-upload-pack-ref-in-want.sh            | 16 ++---\n t/t5801-remote-helpers.sh                     |  2 +\n .../t5801/git-remote-testgit                  |  0\n 15 files changed, 104 insertions(+), 54 deletions(-)\n rename builtin/serve.c => t/helper/test-serve-v2.c (81%)\n rename git-remote-testgit.sh => t/t5801/git-remote-testgit (100%)\n\n\nbase-commit: 5ee42463399ca3cc75b7e6e4368a3a5df5b010f2\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-168%2Fdscho%2Fdocs-misc-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-168/dscho/docs-misc-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/168\n-- \ngitgitgadget\n"},{"id":"373738","messageId":"81c08b178be6329d51586fa9d615063d3c6f9625.1555070430.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.git.gitgitgadget@gmail.com","subject":"[PATCH 1/7] remote-testgit: move it into the support directory for t5801","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-12T12:00:31Z","receivedAt":"2019-04-12T12:00:36Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe `git-remote-testgit` script is really only used in\n`t5801-remote-helpers.sh`. It does not even contain any `@@<MAGIC>@@`\nplaceholders that would need to be interpolated via `make\ngit-remote-testgit`.\n\nLet's just move it to a new home, decluttering the top-level directory\nand clarifying that this is just a test helper, not an official Git\ncommand that we would want to ever support.\n\nSuggested by Ævar Arnfjörð Bjarmason.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .gitignore                                          | 1 -\n Makefile                                            | 3 ---\n t/t5801-remote-helpers.sh                           | 2 ++\n git-remote-testgit.sh => t/t5801/git-remote-testgit | 0\n 4 files changed, 2 insertions(+), 4 deletions(-)\n rename git-remote-testgit.sh => t/t5801/git-remote-testgit (100%)\n\ndiff --git a/.gitignore b/.gitignore\nindex 7374587f9d..de8fc2f5b1 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -135,7 +135,6 @@\n /git-remote-ftps\n /git-remote-fd\n /git-remote-ext\n-/git-remote-testgit\n /git-remote-testpy\n /git-remote-testsvn\n /git-repack\ndiff --git a/Makefile b/Makefile\nindex 8654c130f8..26f8ed2228 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -633,7 +633,6 @@ SCRIPT_SH += git-merge-resolve.sh\n SCRIPT_SH += git-mergetool.sh\n SCRIPT_SH += git-quiltimport.sh\n SCRIPT_SH += git-legacy-rebase.sh\n-SCRIPT_SH += git-remote-testgit.sh\n SCRIPT_SH += git-request-pull.sh\n SCRIPT_SH += git-stash.sh\n SCRIPT_SH += git-submodule.sh\n@@ -657,8 +656,6 @@ SCRIPT_PERL += git-svn.perl\n \n SCRIPT_PYTHON += git-p4.py\n \n-NO_INSTALL += git-remote-testgit\n-\n # Generated files for scripts\n SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))\n SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))\ndiff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh\nindex aaaa722cca..d04f8007e0 100755\n--- a/t/t5801-remote-helpers.sh\n+++ b/t/t5801-remote-helpers.sh\n@@ -8,6 +8,8 @@ test_description='Test remote-helper import and export commands'\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-gpg.sh\n \n+PATH=\"$TEST_DIRECTORY/t5801:$PATH\"\n+\n compare_refs() {\n \tgit --git-dir=\"$1/.git\" rev-parse --verify $2 >expect &&\n \tgit --git-dir=\"$3/.git\" rev-parse --verify $4 >actual &&\ndiff --git a/git-remote-testgit.sh b/t/t5801/git-remote-testgit\nsimilarity index 100%\nrename from git-remote-testgit.sh\nrename to t/t5801/git-remote-testgit\n-- \ngitgitgadget\n\n"},{"id":"373739","messageId":"7dc5293e9e0f8997674b1273393f22954e72c4cd.1555070430.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.git.gitgitgadget@gmail.com","subject":"[PATCH 2/7] help -a: do not list commands that are excluded from the build","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-12T12:00:32Z","receivedAt":"2019-04-12T12:00:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWhen built with NO_CURL or with NO_UNIX_SOCKETS, some commands are\nskipped from the build. It does not make sense to list them in the\noutput of `git help -a`, so let's just not.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Makefile            | 14 ++++++++++++--\n generate-cmdlist.sh | 10 +++++++++-\n 2 files changed, 21 insertions(+), 3 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 26f8ed2228..8f3c477ab3 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -611,6 +611,7 @@ FUZZ_PROGRAMS =\n LIB_OBJS =\n PROGRAM_OBJS =\n PROGRAMS =\n+EXCLUDED_PROGRAMS =\n SCRIPT_PERL =\n SCRIPT_PYTHON =\n SCRIPT_SH =\n@@ -1323,6 +1324,7 @@ ifdef NO_CURL\n \tREMOTE_CURL_PRIMARY =\n \tREMOTE_CURL_ALIASES =\n \tREMOTE_CURL_NAMES =\n+\tEXCLUDED_PROGRAMS += git-http-fetch git-http-push\n else\n \tifdef CURLDIR\n \t\t# Try \"-Wl,-rpath=$(CURLDIR)/$(lib)\" in such a case.\n@@ -1347,7 +1349,11 @@ endif\n \tifeq \"$(curl_check)\" \"070908\"\n \t\tifndef NO_EXPAT\n \t\t\tPROGRAM_OBJS += http-push.o\n+\t\telse\n+\t\t\tEXCLUDED_PROGRAMS += git-http-push\n \t\tendif\n+\telse\n+\t\tEXCLUDED_PROGRAMS += git-http-push\n \tendif\n \tcurl_check := $(shell (echo 072200; $(CURL_CONFIG) --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)\n \tifeq \"$(curl_check)\" \"072200\"\n@@ -1593,7 +1599,9 @@ ifdef NO_INET_PTON\n \tLIB_OBJS += compat/inet_pton.o\n \tBASIC_CFLAGS += -DNO_INET_PTON\n endif\n-ifndef NO_UNIX_SOCKETS\n+ifdef NO_UNIX_SOCKETS\n+\tEXCLUDED_PROGRAMS += git-credential-cache git-credential-cache--daemon\n+else\n \tLIB_OBJS += unix-socket.o\n \tPROGRAM_OBJS += credential-cache.o\n \tPROGRAM_OBJS += credential-cache--daemon.o\n@@ -2112,7 +2120,9 @@ $(BUILT_INS): git$X\n command-list.h: generate-cmdlist.sh command-list.txt\n \n command-list.h: $(wildcard Documentation/git*.txt) Documentation/*config.txt Documentation/config/*.txt\n-\t$(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh command-list.txt >$@+ && mv $@+ $@\n+\t$(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh \\\n+\t\t$(patsubst %,--exclude-program %,$(EXCLUDED_PROGRAMS)) \\\n+\t\tcommand-list.txt >$@+ && mv $@+ $@\n \n SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\\\n \t$(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\\\ndiff --git a/generate-cmdlist.sh b/generate-cmdlist.sh\nindex 709d67405b..7867b99d19 100755\n--- a/generate-cmdlist.sh\n+++ b/generate-cmdlist.sh\n@@ -6,7 +6,7 @@ die () {\n }\n \n command_list () {\n-\tgrep -v '^#' \"$1\"\n+\teval grep -ve '^#' $exclude_programs \"$1\"\n }\n \n get_categories () {\n@@ -93,6 +93,14 @@ EOF\n EOF\n }\n \n+exclude_programs=\n+while test \"a$1\" = \"a--exclude-program\"\n+do\n+\tshift\n+\texclude_programs=\"$exclude_programs -e \\\"^$1 \\\"\"\n+\tshift\n+done\n+\n echo \"/* Automatically generated by generate-cmdlist.sh */\n struct cmdname_help {\n \tconst char *name;\n-- \ngitgitgadget\n\n"},{"id":"373740","messageId":"31d8e43cbfaec36f662006a711b64bca47009e59.1555070430.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.git.gitgitgadget@gmail.com","subject":"[PATCH 4/7] docs: exclude documentation for commands that have been excluded","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-12T12:00:34Z","receivedAt":"2019-04-12T12:00:40Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWhen building with certain build options, some commands are excluded\nfrom the build. For example, `git-credential-cache` is skipped when\nbuilding with `NO_UNIX_SOCKETS`.\n\nLet's not build or package documentation for those excluded commands.\n\nThis issue was pointed out rightfully when running `make check-docs` on\nWindows, where we do not yet have Unix sockets, and therefore the\n`credential-cache` command is excluded (yet its documentation was built\nand shipped).\n\nNote: building the documentation via `make -C Documentation` leaves the\nbuild system with no way to determine which commands have been\nexcluded. If called thusly, we gracefully fail to exclude their\ndocumentation. Only when building the documentation via the top-level\nMakefile will it get excluded properly, or after building\n`Documentation/GIT-EXCLUDED-PROGRAMS` manually.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Documentation/.gitignore |  1 +\n Documentation/Makefile   |  3 +++\n Makefile                 | 36 ++++++++++++++++++++----------------\n 3 files changed, 24 insertions(+), 16 deletions(-)\n\ndiff --git a/Documentation/.gitignore b/Documentation/.gitignore\nindex 3ef54e0adb..ea27148c59 100644\n--- a/Documentation/.gitignore\n+++ b/Documentation/.gitignore\n@@ -13,3 +13,4 @@ mergetools-*.txt\n manpage-base-url.xsl\n SubmittingPatches.txt\n tmp-doc-diff/\n+/GIT-EXCLUDED-PROGRAMS\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex af0e2cf11a..e22ea2f57c 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -7,7 +7,10 @@ ARTICLES =\n SP_ARTICLES =\n OBSOLETE_HTML =\n \n+-include GIT-EXCLUDED-PROGRAMS\n+\n MAN1_TXT += $(filter-out \\\n+\t\t$(patsubst %,%.txt,$(EXCLUDED_PROGRAMS)) \\\n \t\t$(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \\\n \t\t$(wildcard git-*.txt))\n MAN1_TXT += git.txt\ndiff --git a/Makefile b/Makefile\nindex 5880d4d3a9..a5212c64bf 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2455,22 +2455,25 @@ $(VCSSVN_LIB): $(VCSSVN_OBJS)\n \n export DEFAULT_EDITOR DEFAULT_PAGER\n \n+Documentation/GIT-EXCLUDED-PROGRAMS: Makefile config.mak.uname\n+\t$(QUIET_GEN)echo \"EXCLUDED_PROGRAMS := $(EXCLUDED_PROGRAMS)\" >$@\n+\n .PHONY: doc man man-perl html info pdf\n-doc: man-perl\n+doc: man-perl Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(MAKE) -C Documentation all\n \n-man: man-perl\n+man: man-perl Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(MAKE) -C Documentation man\n \n man-perl: perl/build/man/man3/Git.3pm\n \n-html:\n+html: Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(MAKE) -C Documentation html\n \n-info:\n+info: Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(MAKE) -C Documentation info\n \n-pdf:\n+pdf: Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(MAKE) -C Documentation pdf\n \n XGETTEXT_FLAGS = \\\n@@ -2907,33 +2910,33 @@ endif\n install-gitweb:\n \t$(MAKE) -C gitweb install\n \n-install-doc: install-man-perl\n+install-doc: install-man-perl Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(MAKE) -C Documentation install\n \n-install-man: install-man-perl\n+install-man: install-man-perl Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(MAKE) -C Documentation install-man\n \n-install-man-perl: man-perl\n+install-man-perl: man-perl Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mandir_SQ)/man3'\n \t(cd perl/build/man/man3 && $(TAR) cf - .) | \\\n \t(cd '$(DESTDIR_SQ)$(mandir_SQ)/man3' && umask 022 && $(TAR) xof -)\n \n-install-html:\n+install-html: Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(MAKE) -C Documentation install-html\n \n-install-info:\n+install-info: Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(MAKE) -C Documentation install-info\n \n-install-pdf:\n+install-pdf: Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(MAKE) -C Documentation install-pdf\n \n-quick-install-doc:\n+quick-install-doc: Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(MAKE) -C Documentation quick-install\n \n-quick-install-man:\n+quick-install-man: Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(MAKE) -C Documentation quick-install-man\n \n-quick-install-html:\n+quick-install-html: Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(MAKE) -C Documentation quick-install-html\n \n \n@@ -2988,7 +2991,7 @@ artifacts-tar:: $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS) \\\n htmldocs = git-htmldocs-$(GIT_VERSION)\n manpages = git-manpages-$(GIT_VERSION)\n .PHONY: dist-doc distclean\n-dist-doc:\n+dist-doc: Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(RM) -r .doc-tmp-dir\n \tmkdir .doc-tmp-dir\n \t$(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc\n@@ -3035,6 +3038,7 @@ clean: profile-clean coverage-clean cocciclean\n \t$(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz\n \t$(RM) $(htmldocs).tar.gz $(manpages).tar.gz\n \t$(MAKE) -C Documentation/ clean\n+\t$(RM) Documentation/GIT-EXCLUDED-PROGRAMS\n ifndef NO_PERL\n \t$(MAKE) -C gitweb clean\n \t$(RM) -r perl/build/\n@@ -3062,7 +3066,7 @@ ALL_COMMANDS += gitweb\n ALL_COMMANDS += git-gui git-citool\n \n .PHONY: check-docs\n-check-docs::\n+check-docs:: Documentation/GIT-EXCLUDED-PROGRAMS\n \t$(MAKE) -C Documentation lint-docs\n \t@(for v in $(patsubst %$X,%,$(ALL_COMMANDS)); \\\n \tdo \\\n-- \ngitgitgadget\n\n"},{"id":"373741","messageId":"96ced7e17cb40c4d0f15955c482857196862ab80.1555070430.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.git.gitgitgadget@gmail.com","subject":"[PATCH 3/7] check-docs: do not pretend that commands are listed which are excluded","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-12T12:00:33Z","receivedAt":"2019-04-12T12:00:41Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn the previous commit, we taught `git help -a` to stop listing commands\nthat are excluded from the build.\n\nIn this commit, we stop `check-docs` from claiming that those commands\nare listed.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Makefile | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Makefile b/Makefile\nindex 8f3c477ab3..5880d4d3a9 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -3085,6 +3085,7 @@ check-docs::\n \t( \\\n \t\tsed -e '1,/^### command list/d' \\\n \t\t    -e '/^#/d' \\\n+\t\t    $(patsubst %,-e '/^% /d',$(EXCLUDED_PROGRAMS)) \\\n \t\t    -e '/guide$$/d' \\\n \t\t    -e 's/[ \t].*//' \\\n \t\t    -e 's/^/listed /' command-list.txt; \\\n-- \ngitgitgadget\n\n"},{"id":"373742","messageId":"411587e4b80bd4e5a1cb9b1ec438cda7a0681465.1555070430.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.git.gitgitgadget@gmail.com","subject":"[PATCH 7/7] Turn `git serve` into a test helper","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-12T12:00:37Z","receivedAt":"2019-04-12T12:00:43Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe `git serve` built-in was introduced in ed10cb952d31 (serve:\nintroduce git-serve, 2018-03-15) as a backend to serve Git protocol v2,\nprobably originally intended to be spawned by `git upload-pack`.\n\nHowever, in the version that the protocol v2 patches made it into core\nGit, `git upload-pack` calls the `serve()` function directly instead of\nspawning `git serve`; The only reason in life for `git serve` to survive\nas a built-in command is to provide a way to test the protocol v2\nfunctionality.\n\nMeaning that it does not even have to be a built-in that is installed\nwith end-user facing Git installations, but it can be a test helper\ninstead.\n\nLet's make it so.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Makefile                                    |  2 +-\n builtin.h                                   |  1 -\n git.c                                       |  1 -\n builtin/serve.c => t/helper/test-serve-v2.c |  7 +++--\n t/helper/test-tool.c                        |  1 +\n t/helper/test-tool.h                        |  1 +\n t/t5701-git-serve.sh                        | 32 ++++++++++++---------\n t/t5702-protocol-v2.sh                      |  5 ++--\n t/t5703-upload-pack-ref-in-want.sh          | 16 +++++------\n 9 files changed, 36 insertions(+), 30 deletions(-)\n rename builtin/serve.c => t/helper/test-serve-v2.c (81%)\n\ndiff --git a/Makefile b/Makefile\nindex caa20923a4..d7656cdc4f 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -762,6 +762,7 @@ TEST_BUILTINS_OBJS += test-repository.o\n TEST_BUILTINS_OBJS += test-revision-walking.o\n TEST_BUILTINS_OBJS += test-run-command.o\n TEST_BUILTINS_OBJS += test-scrap-cache-tree.o\n+TEST_BUILTINS_OBJS += test-serve-v2.o\n TEST_BUILTINS_OBJS += test-sha1.o\n TEST_BUILTINS_OBJS += test-sha1-array.o\n TEST_BUILTINS_OBJS += test-sha256.o\n@@ -1131,7 +1132,6 @@ BUILTIN_OBJS += builtin/rev-parse.o\n BUILTIN_OBJS += builtin/revert.o\n BUILTIN_OBJS += builtin/rm.o\n BUILTIN_OBJS += builtin/send-pack.o\n-BUILTIN_OBJS += builtin/serve.o\n BUILTIN_OBJS += builtin/shortlog.o\n BUILTIN_OBJS += builtin/show-branch.o\n BUILTIN_OBJS += builtin/show-index.o\ndiff --git a/builtin.h b/builtin.h\nindex 6538932e99..c48636e244 100644\n--- a/builtin.h\n+++ b/builtin.h\n@@ -219,7 +219,6 @@ extern int cmd_rev_parse(int argc, const char **argv, const char *prefix);\n extern int cmd_revert(int argc, const char **argv, const char *prefix);\n extern int cmd_rm(int argc, const char **argv, const char *prefix);\n extern int cmd_send_pack(int argc, const char **argv, const char *prefix);\n-extern int cmd_serve(int argc, const char **argv, const char *prefix);\n extern int cmd_shortlog(int argc, const char **argv, const char *prefix);\n extern int cmd_show(int argc, const char **argv, const char *prefix);\n extern int cmd_show_branch(int argc, const char **argv, const char *prefix);\ndiff --git a/git.c b/git.c\nindex 2dd588674f..c58b067771 100644\n--- a/git.c\n+++ b/git.c\n@@ -548,7 +548,6 @@ static struct cmd_struct commands[] = {\n \t{ \"revert\", cmd_revert, RUN_SETUP | NEED_WORK_TREE },\n \t{ \"rm\", cmd_rm, RUN_SETUP },\n \t{ \"send-pack\", cmd_send_pack, RUN_SETUP },\n-\t{ \"serve\", cmd_serve, RUN_SETUP },\n \t{ \"shortlog\", cmd_shortlog, RUN_SETUP_GENTLY | USE_PAGER },\n \t{ \"show\", cmd_show, RUN_SETUP },\n \t{ \"show-branch\", cmd_show_branch, RUN_SETUP },\ndiff --git a/builtin/serve.c b/t/helper/test-serve-v2.c\nsimilarity index 81%\nrename from builtin/serve.c\nrename to t/helper/test-serve-v2.c\nindex d3fd240bb3..aee35e5aef 100644\n--- a/builtin/serve.c\n+++ b/t/helper/test-serve-v2.c\n@@ -1,14 +1,14 @@\n+#include \"test-tool.h\"\n #include \"cache.h\"\n-#include \"builtin.h\"\n #include \"parse-options.h\"\n #include \"serve.h\"\n \n static char const * const serve_usage[] = {\n-\tN_(\"git serve [<options>]\"),\n+\tN_(\"test-tool serve-v2 [<options>]\"),\n \tNULL\n };\n \n-int cmd_serve(int argc, const char **argv, const char *prefix)\n+int cmd__serve_v2(int argc, const char **argv)\n {\n \tstruct serve_options opts = SERVE_OPTIONS_INIT;\n \n@@ -19,6 +19,7 @@ int cmd_serve(int argc, const char **argv, const char *prefix)\n \t\t\t N_(\"exit immediately after advertising capabilities\")),\n \t\tOPT_END()\n \t};\n+\tconst char *prefix = setup_git_directory();\n \n \t/* ignore all unknown cmdline switches for now */\n \targc = parse_options(argc, argv, prefix, options, serve_usage,\ndiff --git a/t/helper/test-tool.c b/t/helper/test-tool.c\nindex 2b21943f93..4bf3666b43 100644\n--- a/t/helper/test-tool.c\n+++ b/t/helper/test-tool.c\n@@ -48,6 +48,7 @@ static struct test_cmd cmds[] = {\n \t{ \"revision-walking\", cmd__revision_walking },\n \t{ \"run-command\", cmd__run_command },\n \t{ \"scrap-cache-tree\", cmd__scrap_cache_tree },\n+\t{ \"serve-v2\", cmd__serve_v2 },\n \t{ \"sha1\", cmd__sha1 },\n \t{ \"sha1-array\", cmd__sha1_array },\n \t{ \"sha256\", cmd__sha256 },\ndiff --git a/t/helper/test-tool.h b/t/helper/test-tool.h\nindex 25abed1cf2..bc72370916 100644\n--- a/t/helper/test-tool.h\n+++ b/t/helper/test-tool.h\n@@ -39,6 +39,7 @@ int cmd__repository(int argc, const char **argv);\n int cmd__revision_walking(int argc, const char **argv);\n int cmd__run_command(int argc, const char **argv);\n int cmd__scrap_cache_tree(int argc, const char **argv);\n+int cmd__serve_v2(int argc, const char **argv);\n int cmd__sha1(int argc, const char **argv);\n int cmd__sha1_array(int argc, const char **argv);\n int cmd__sha256(int argc, const char **argv);\ndiff --git a/t/t5701-git-serve.sh b/t/t5701-git-serve.sh\nindex fe45bf828d..ffb9613885 100755\n--- a/t/t5701-git-serve.sh\n+++ b/t/t5701-git-serve.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-test_description='test git-serve and server commands'\n+test_description='test protocol v2 server commands'\n \n . ./test-lib.sh\n \n@@ -14,7 +14,8 @@ test_expect_success 'test capability advertisement' '\n \t0000\n \tEOF\n \n-\tGIT_TEST_SIDEBAND_ALL=0 git serve --advertise-capabilities >out &&\n+\tGIT_TEST_SIDEBAND_ALL=0 test-tool serve-v2 \\\n+\t\t--advertise-capabilities >out &&\n \ttest-tool pkt-line unpack <out >actual &&\n \ttest_cmp expect actual\n '\n@@ -24,11 +25,11 @@ test_expect_success 'stateless-rpc flag does not list capabilities' '\n \ttest-tool pkt-line pack >in <<-EOF &&\n \t0000\n \tEOF\n-\tgit serve --stateless-rpc >out <in &&\n+\ttest-tool serve-v2 --stateless-rpc >out <in &&\n \ttest_must_be_empty out &&\n \n \t# EOF\n-\tgit serve --stateless-rpc >out &&\n+\ttest-tool serve-v2 --stateless-rpc >out &&\n \ttest_must_be_empty out\n '\n \n@@ -37,7 +38,7 @@ test_expect_success 'request invalid capability' '\n \tfoobar\n \t0000\n \tEOF\n-\ttest_must_fail git serve --stateless-rpc 2>err <in &&\n+\ttest_must_fail test-tool serve-v2 --stateless-rpc 2>err <in &&\n \ttest_i18ngrep \"unknown capability\" err\n '\n \n@@ -46,7 +47,7 @@ test_expect_success 'request with no command' '\n \tagent=git/test\n \t0000\n \tEOF\n-\ttest_must_fail git serve --stateless-rpc 2>err <in &&\n+\ttest_must_fail test-tool serve-v2 --stateless-rpc 2>err <in &&\n \ttest_i18ngrep \"no command requested\" err\n '\n \n@@ -56,7 +57,7 @@ test_expect_success 'request invalid command' '\n \tagent=git/test\n \t0000\n \tEOF\n-\ttest_must_fail git serve --stateless-rpc 2>err <in &&\n+\ttest_must_fail test-tool serve-v2 --stateless-rpc 2>err <in &&\n \ttest_i18ngrep \"invalid command\" err\n '\n \n@@ -87,7 +88,7 @@ test_expect_success 'basics of ls-refs' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc <in >out &&\n+\ttest-tool serve-v2 --stateless-rpc <in >out &&\n \ttest-tool pkt-line unpack <out >actual &&\n \ttest_cmp expect actual\n '\n@@ -107,7 +108,7 @@ test_expect_success 'basic ref-prefixes' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc <in >out &&\n+\ttest-tool serve-v2 --stateless-rpc <in >out &&\n \ttest-tool pkt-line unpack <out >actual &&\n \ttest_cmp expect actual\n '\n@@ -127,7 +128,7 @@ test_expect_success 'refs/heads prefix' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc <in >out &&\n+\ttest-tool serve-v2 --stateless-rpc <in >out &&\n \ttest-tool pkt-line unpack <out >actual &&\n \ttest_cmp expect actual\n '\n@@ -148,7 +149,7 @@ test_expect_success 'peel parameter' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc <in >out &&\n+\ttest-tool serve-v2 --stateless-rpc <in >out &&\n \ttest-tool pkt-line unpack <out >actual &&\n \ttest_cmp expect actual\n '\n@@ -169,7 +170,7 @@ test_expect_success 'symrefs parameter' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc <in >out &&\n+\ttest-tool serve-v2 --stateless-rpc <in >out &&\n \ttest-tool pkt-line unpack <out >actual &&\n \ttest_cmp expect actual\n '\n@@ -189,7 +190,7 @@ test_expect_success 'sending server-options' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc <in >out &&\n+\ttest-tool serve-v2 --stateless-rpc <in >out &&\n \ttest-tool pkt-line unpack <out >actual &&\n \ttest_cmp expect actual\n '\n@@ -204,7 +205,10 @@ test_expect_success 'unexpected lines are not allowed in fetch request' '\n \t0000\n \tEOF\n \n-\ttest_must_fail git -C server serve --stateless-rpc <in >/dev/null 2>err &&\n+\t(\n+\t\tcd server &&\n+\t\ttest_must_fail test-tool serve-v2 --stateless-rpc\n+\t) <in >/dev/null 2>err &&\n \tgrep \"unexpected line: .this-is-not-a-command.\" err\n '\n \ndiff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh\nindex db4ae09f2f..8691bfc52d 100755\n--- a/t/t5702-protocol-v2.sh\n+++ b/t/t5702-protocol-v2.sh\n@@ -359,12 +359,13 @@ test_expect_success 'even with handcrafted request, filter does not work if not\n \t0000\n \tEOF\n \n-\ttest_must_fail git -C server serve --stateless-rpc <in >/dev/null 2>err &&\n+\ttest_must_fail test-tool -C server serve-v2 --stateless-rpc \\\n+\t\t<in >/dev/null 2>err &&\n \tgrep \"unexpected line: .filter blob:none.\" err &&\n \n \t# Exercise to ensure that if advertised, filter works\n \tgit -C server config uploadpack.allowfilter 1 &&\n-\tgit -C server serve --stateless-rpc <in >/dev/null\n+\ttest-tool -C server serve-v2 --stateless-rpc <in >/dev/null\n '\n \n test_expect_success 'default refspec is used to filter ref when fetchcing' '\ndiff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\nindex f87b2f6df3..dd1cbd0dd6 100755\n--- a/t/t5703-upload-pack-ref-in-want.sh\n+++ b/t/t5703-upload-pack-ref-in-want.sh\n@@ -48,15 +48,15 @@ test_expect_success 'setup repository' '\n '\n \n test_expect_success 'config controls ref-in-want advertisement' '\n-\tgit serve --advertise-capabilities >out &&\n+\ttest-tool serve-v2 --advertise-capabilities >out &&\n \t! grep -a ref-in-want out &&\n \n \tgit config uploadpack.allowRefInWant false &&\n-\tgit serve --advertise-capabilities >out &&\n+\ttest-tool serve-v2 --advertise-capabilities >out &&\n \t! grep -a ref-in-want out &&\n \n \tgit config uploadpack.allowRefInWant true &&\n-\tgit serve --advertise-capabilities >out &&\n+\ttest-tool serve-v2 --advertise-capabilities >out &&\n \tgrep -a ref-in-want out\n '\n \n@@ -70,7 +70,7 @@ test_expect_success 'invalid want-ref line' '\n \t0000\n \tEOF\n \n-\ttest_must_fail git serve --stateless-rpc 2>out <in &&\n+\ttest_must_fail test-tool serve-v2 --stateless-rpc 2>out <in &&\n \tgrep \"unknown ref\" out\n '\n \n@@ -90,7 +90,7 @@ test_expect_success 'basic want-ref' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc >out <in &&\n+\ttest-tool serve-v2 --stateless-rpc >out <in &&\n \tcheck_output\n '\n \n@@ -112,7 +112,7 @@ test_expect_success 'multiple want-ref lines' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc >out <in &&\n+\ttest-tool serve-v2 --stateless-rpc >out <in &&\n \tcheck_output\n '\n \n@@ -133,7 +133,7 @@ test_expect_success 'mix want and want-ref' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc >out <in &&\n+\ttest-tool serve-v2 --stateless-rpc >out <in &&\n \tcheck_output\n '\n \n@@ -153,7 +153,7 @@ test_expect_success 'want-ref with ref we already have commit for' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc >out <in &&\n+\ttest-tool serve-v2 --stateless-rpc >out <in &&\n \tcheck_output\n '\n \n-- \ngitgitgadget\n"},{"id":"373743","messageId":"2e19f538bcc20393468535561b6857ba3ab252f8.1555070430.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.git.gitgitgadget@gmail.com","subject":"[PATCH 6/7] test-tool: handle the `-C <directory>` option just like `git`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-12T12:00:36Z","receivedAt":"2019-04-12T12:00:44Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn preparation for moving `git serve` into `test-tool` (because it\nreally is only used by the test suite), we teach the `test-tool` the\nuseful trick to change the working directory before running the test\ncommand, which will avoid introducing subshells in the test code.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/helper/test-tool.c | 19 +++++++++++++++++++\n 1 file changed, 19 insertions(+)\n\ndiff --git a/t/helper/test-tool.c b/t/helper/test-tool.c\nindex 99db7409b8..2b21943f93 100644\n--- a/t/helper/test-tool.c\n+++ b/t/helper/test-tool.c\n@@ -1,5 +1,11 @@\n #include \"git-compat-util.h\"\n #include \"test-tool.h\"\n+#include \"parse-options.h\"\n+\n+static const char * const test_tool_usage[] = {\n+\t\"test-tool [-C <directory>] <command [<arguments>...]]\",\n+\tNULL\n+};\n \n struct test_cmd {\n \tconst char *name;\n@@ -73,11 +79,24 @@ static NORETURN void die_usage(void)\n int cmd_main(int argc, const char **argv)\n {\n \tint i;\n+\tconst char *working_directory = NULL;\n+\tstruct option options[] = {\n+\t\tOPT_STRING('C', NULL, &working_directory, \"directory\",\n+\t\t\t   \"change the working directory\"),\n+\t\tOPT_END()\n+\t};\n \n \tBUG_exit_code = 99;\n+\targc = parse_options(argc, argv, NULL, options, test_tool_usage,\n+\t\t\t     PARSE_OPT_STOP_AT_NON_OPTION |\n+\t\t\t     PARSE_OPT_KEEP_ARGV0);\n+\n \tif (argc < 2)\n \t\tdie_usage();\n \n+\tif (working_directory && chdir(working_directory) < 0)\n+\t\tdie(\"Could not cd to '%s'\", working_directory);\n+\n \tfor (i = 0; i < ARRAY_SIZE(cmds); i++) {\n \t\tif (!strcmp(cmds[i].name, argv[1])) {\n \t\t\targv++;\n-- \ngitgitgadget\n\n"},{"id":"373744","messageId":"fb3daa6427595b1df24d3664212a704da171c95e.1555070430.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.git.gitgitgadget@gmail.com","subject":"[PATCH 5/7] check-docs: do not bother checking for legacy scripts' documentation","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-12T12:00:35Z","receivedAt":"2019-04-12T12:00:45Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn the recent years, there has been a big push to convert more and more\nof Git's commands that are implemented as scripts to built-ins written\nin pure, portable C, for robustness, speed and portability.\n\nOne strategy that served us well is to convert those scripts\nincrementally, starting by renaming the scripts to\n`git-legacy-<command>`, then introducing a built-in that does nothing\nelse at first than checking the config setting `<command>.useBuiltin`\n(which defaults to `false` at the outset) and handing off to the legacy\nscript if so asked.\n\nObviously, those `git-legacy-<command>` commands share the documentation\nwith the built-in `git-<command>`, and are not intended to be called\ndirectly anyway. So let's not try to ensure that they are documented\nseparately from their built-in versions.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Makefile | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex a5212c64bf..caa20923a4 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -3074,7 +3074,7 @@ check-docs:: Documentation/GIT-EXCLUDED-PROGRAMS\n \t\tgit-merge-octopus | git-merge-ours | git-merge-recursive | \\\n \t\tgit-merge-resolve | git-merge-subtree | \\\n \t\tgit-fsck-objects | git-init-db | \\\n-\t\tgit-remote-* | git-stage | \\\n+\t\tgit-remote-* | git-stage | git-legacy-* | \\\n \t\tgit-?*--?* ) continue ;; \\\n \t\tesac ; \\\n \t\ttest -f \"Documentation/$$v.txt\" || \\\n-- \ngitgitgadget\n\n"},{"id":"373753","messageId":"CAPig+cTiF-9+pXnx19y0PUs3Nwek7N2cEg2r2jAPzEXPTvpxpA@mail.gmail.com","threadId":"50926","inReplyTo":"31d8e43cbfaec36f662006a711b64bca47009e59.1555070430.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 4/7] docs: exclude documentation for commands that have been excluded","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2019-04-12T18:46:38Z","receivedAt":"2019-04-12T18:46:52Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Fri, Apr 12, 2019 at 8:00 AM Johannes Schindelin via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n> When building with certain build options, some commands are excluded\n> from the build. For example, `git-credential-cache` is skipped when\n> building with `NO_UNIX_SOCKETS`.\n>\n> Let's not build or package documentation for those excluded commands.\n> [...]\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n> diff --git a/Makefile b/Makefile\n> @@ -2455,22 +2455,25 @@ $(VCSSVN_LIB): $(VCSSVN_OBJS)\n> +Documentation/GIT-EXCLUDED-PROGRAMS: Makefile config.mak.uname\n> +       $(QUIET_GEN)echo \"EXCLUDED_PROGRAMS := $(EXCLUDED_PROGRAMS)\" >$@\n\nShould this rule also have a dependency upon \"config.mak.autogen\"?\nPerhaps like this:\n\nDocumentation/GIT-EXCLUDED-PROGRAMS: Makefile $(wildcard config.mak*)\n"},{"id":"373841","messageId":"xmqqpnpoufp5.fsf@gitster-ct.c.googlers.com","threadId":"50926","inReplyTo":"CAPig+cTiF-9+pXnx19y0PUs3Nwek7N2cEg2r2jAPzEXPTvpxpA@mail.gmail.com","subject":"Re: [PATCH 4/7] docs: exclude documentation for commands that have been excluded","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-15T03:09:58Z","receivedAt":"2019-04-15T03:10:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n>> diff --git a/Makefile b/Makefile\n>> @@ -2455,22 +2455,25 @@ $(VCSSVN_LIB): $(VCSSVN_OBJS)\n>> +Documentation/GIT-EXCLUDED-PROGRAMS: Makefile config.mak.uname\n>> +       $(QUIET_GEN)echo \"EXCLUDED_PROGRAMS := $(EXCLUDED_PROGRAMS)\" >$@\n>\n> Should this rule also have a dependency upon \"config.mak.autogen\"?\n\nThat is probably a good point.\n\n> Perhaps like this:\n>\n> Documentation/GIT-EXCLUDED-PROGRAMS: Makefile $(wildcard config.mak*)\n\nI'd rather not let changes to \"config.mak-\", which I keep in my\nworking tree (untracked and disabled copy of config.mak, that can be\nreadily activated by renaming), be part of dependency rules.\n\nIf we know 'autogen' is the only dependency that optionally can\nexist, then depending explicitly on $(wildcard config.mak.autogen)\nwould be a better alternative.  To those who do not use the autoconf,\nthe macro will expand to an empty string, and to those who do have the\npath on the filesystem, the macro parrots the constant string it was\ngiven, which is exactly what we want.\n\nThanks.\n\n"},{"id":"373842","messageId":"CAPig+cQ3drZ+iE=SkSXTdHVfTxLkPTi=VTJCMJn7LKLxcpC-pQ@mail.gmail.com","threadId":"50926","inReplyTo":"xmqqpnpoufp5.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 4/7] docs: exclude documentation for commands that have been excluded","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2019-04-15T04:16:51Z","receivedAt":"2019-04-15T04:17:05Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sun, Apr 14, 2019 at 11:10 PM Junio C Hamano <gitster@pobox.com> wrote:\n> Eric Sunshine <sunshine@sunshineco.com> writes:\n> >> +Documentation/GIT-EXCLUDED-PROGRAMS: Makefile config.mak.uname\n> >> +       $(QUIET_GEN)echo \"EXCLUDED_PROGRAMS := $(EXCLUDED_PROGRAMS)\" >$@\n> >\n> > Should this rule also have a dependency upon \"config.mak.autogen\"?\n>\n> That is probably a good point.\n>\n> > Perhaps like this:\n> >\n> > Documentation/GIT-EXCLUDED-PROGRAMS: Makefile $(wildcard config.mak*)\n>\n> I'd rather not let changes to \"config.mak-\", which I keep in my\n> working tree (untracked and disabled copy of config.mak, that can be\n> readily activated by renaming), be part of dependency rules.\n>\n> If we know 'autogen' is the only dependency that optionally can\n> exist, then depending explicitly on $(wildcard config.mak.autogen)\n> would be a better alternative.\n\nWhen composing that email, I originally wrote $(wildcard\nconfig.mak.autogen) as the suggestion but changed it to the looser\n$(wildcard config.mak*) when I realized that the developer's own\nconfig.mak probably ought to be a dependency, as well. Taking your\nobjection into consideration, we could mention both explicitly:\n\n    Documentation/GIT-EXCLUDED-PROGRAMS: Makefile \\\n        $(wildcard config.mak) $(wildcard config.mak.autogen)\n"},{"id":"373843","messageId":"CAPig+cSHJ_g=KGBL2qoJK7Ddv6QhoC2Fq=2dyRF1qexAv63RiA@mail.gmail.com","threadId":"50926","inReplyTo":"CAPig+cQ3drZ+iE=SkSXTdHVfTxLkPTi=VTJCMJn7LKLxcpC-pQ@mail.gmail.com","subject":"Re: [PATCH 4/7] docs: exclude documentation for commands that have been excluded","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2019-04-15T04:18:58Z","receivedAt":"2019-04-15T04:19:12Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Apr 15, 2019 at 12:16 AM Eric Sunshine <sunshine@sunshineco.com> wrote:\n> When composing that email, I originally wrote $(wildcard\n> config.mak.autogen) as the suggestion but changed it to the looser\n> $(wildcard config.mak*) when I realized that the developer's own\n> config.mak probably ought to be a dependency, as well. Taking your\n> objection into consideration, we could mention both explicitly:\n>\n>     Documentation/GIT-EXCLUDED-PROGRAMS: Makefile \\\n>         $(wildcard config.mak) $(wildcard config.mak.autogen)\n\nBleh, I forgot config.mak.uname from Dscho's original patch.\n\n    Documentation/GIT-EXCLUDED-PROGRAMS: Makefile config.mak.uname \\\n        $(wildcard config.mak) $(wildcard config.mak.autogen)\n"},{"id":"373847","messageId":"xmqqv9zfsq31.fsf@gitster-ct.c.googlers.com","threadId":"50926","inReplyTo":"81c08b178be6329d51586fa9d615063d3c6f9625.1555070430.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 1/7] remote-testgit: move it into the support directory for t5801","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-15T07:08:34Z","receivedAt":"2019-04-15T07:08:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> The `git-remote-testgit` script is really only used in\n> `t5801-remote-helpers.sh`. It does not even contain any `@@<MAGIC>@@`\n> placeholders that would need to be interpolated via `make\n> git-remote-testgit`.\n>\n> Let's just move it to a new home, decluttering the top-level directory\n> and clarifying that this is just a test helper, not an official Git\n> command that we would want to ever support.\n\nMakes sense.\n\n> @@ -657,8 +656,6 @@ SCRIPT_PERL += git-svn.perl\n>  \n>  SCRIPT_PYTHON += git-p4.py\n>  \n> -NO_INSTALL += git-remote-testgit\n> -\n\nThe line lost here was the last one that updated the value of\nNO_INSTALL, so we should be able to lose all the mentions of the\nmake variable now.\n\n> diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh\n> index aaaa722cca..d04f8007e0 100755\n> --- a/t/t5801-remote-helpers.sh\n> +++ b/t/t5801-remote-helpers.sh\n> @@ -8,6 +8,8 @@ test_description='Test remote-helper import and export commands'\n>  . ./test-lib.sh\n>  . \"$TEST_DIRECTORY\"/lib-gpg.sh\n>  \n> +PATH=\"$TEST_DIRECTORY/t5801:$PATH\"\n> +\n\nI guess this makes much more sense than having it next to other test\nhelpers, as t5801 is the home for the remote-helper tests.\n\nThanks, will queue.\n"},{"id":"373848","messageId":"xmqqo957sq2g.fsf@gitster-ct.c.googlers.com","threadId":"50926","inReplyTo":"7dc5293e9e0f8997674b1273393f22954e72c4cd.1555070430.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 2/7] help -a: do not list commands that are excluded from the build","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-15T07:08:55Z","receivedAt":"2019-04-15T07:09:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> When built with NO_CURL or with NO_UNIX_SOCKETS, some commands are\n> skipped from the build. It does not make sense to list them in the\n> output of `git help -a`, so let's just not.\n\nThe objective makes sense quite a lot.\n\n>  command-list.h: $(wildcard Documentation/git*.txt) Documentation/*config.txt Documentation/config/*.txt\n> -\t$(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh command-list.txt >$@+ && mv $@+ $@\n> +\t$(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh \\\n> +\t\t$(patsubst %,--exclude-program %,$(EXCLUDED_PROGRAMS)) \\\n\nEach whitespace separated token on $(EXCLUDED_PROGRAMS) is the name\nof a program to be excluded and we know there is no funny characters\nin it, hence quoing in \"^$1 \" (without protecting us against\nfunnies) is sufficient.\n\n> +\t\tcommand-list.txt >$@+ && mv $@+ $@\n>  \n>  SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\\\n>  \t$(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\\\n> diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh\n> index 709d67405b..7867b99d19 100755\n> --- a/generate-cmdlist.sh\n> +++ b/generate-cmdlist.sh\n> @@ -6,7 +6,7 @@ die () {\n>  }\n>  \n>  command_list () {\n> -\tgrep -v '^#' \"$1\"\n> +\teval grep -ve '^#' $exclude_programs \"$1\"\n\nThe original protects against $IFS in the filename given as $1, but\nwith the eval that is no longer true.  We have been feeding the\nconstant \"command-list.txt\" to the program since its inception, and\nI do not expect it to change, so this regression in defensiveness\ndoes not matter in practice.  Also because # is prefixed with ^, the\nunintended loss of quotes around it when the eval makes the shell\nre-parse the generated command line would not make the remainder\ninto a comment.\n\nBut it does look brittle, and smells like a trap for less\nexperienced shell programmers to blindly copy & paste & tweak\nwithout understanding what is going on, leading to bugs.\n\n\teval \"grep -v -e '^#' $exclude_programs\" <\"$1\"\n\nor something like that, perhaps?\n\n> @@ -93,6 +93,14 @@ EOF\n>  EOF\n>  }\n>  \n> +exclude_programs=\n> +while test \"a$1\" = \"a--exclude-program\"\n\ns/a/z/g; if you want to pretend to be old-fashioned, but s/a//g;\nshould be sufficient in the modern world.\n\n> +do\n> +\tshift\n> +\texclude_programs=\"$exclude_programs -e \\\"^$1 \\\"\"\n> +\tshift\n> +done\n\nAs I said, this part looks good enough given the things we feed as\nparameters to --exclude-program option.\n\nThanks.\n"},{"id":"373849","messageId":"xmqq4l6zsplq.fsf@gitster-ct.c.googlers.com","threadId":"50926","inReplyTo":"96ced7e17cb40c4d0f15955c482857196862ab80.1555070430.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 3/7] check-docs: do not pretend that commands are listed which are excluded","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-15T07:18:57Z","receivedAt":"2019-04-15T07:19:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> Subject: Re: [PATCH 3/7] check-docs: do not pretend that commands are listed which are excluded\n\nSorry, but I cannot quite parse the title.  I am guessing that you\nmeant \"do not pretend that commands, which are excluded, are\nlisted\", which is a mouthful but at least can be parseable X-<.\n\n> In the previous commit, we taught `git help -a` to stop listing commands\n> that are excluded from the build.\n>\n> In this commit, we stop `check-docs` from claiming that those commands\n> are listed.\n\nI think the result would become more readable (and I suspect that it\nwould at the same time make the title parseable, but I am not sure\nas I do not quite know what the title wants to say in the first\nplace) if you clarified the verb \"list\" here perhaps with \"listed in\ncommand-list.txt\".\n\nThe output from the sed script that filters the contents of the\ncommand-list.txt file is compared with the ALL_COMMANDS list, and\nwe complain if an entry in command-list.txt is no longer in the\nALL_COMMANDS list (i.e. a developer removed a stale command but\nforgot to remove it from the command-list.txt) [*1*].  \n\nThe step 2/7 marked the subcommands that ought to be on ALL_COMMANDS\nfor the purpose of this check but that are excluded from the build,\nas a preparation for this step, and this step 3/7 uses the list of\nexcluded ones to avoid complaining them being in the categorized\nlist of subcommands (i.e. command-list.txt).\n\nMakes sense.\n\n\tSide note *1*.  Another thing we would want to catch is a\n\tdeveloper adding a new subcommand to ALL_COMMANDS while\n\tforgetting to give it a category in the command-list.txt\n\tfile.  That is done in the \"other\" loop before this part,\n\tand the patch is correct that it does not touch that loop to\n\tfilter the command-list using the EXCLUDED_PROGRAMS list.\n\nWe can read that \"stop listing them\" is done as means to some end,\nbut it is unclear what the end-user/developer visible effect this\nstep intends to achieve.  After thinking about what the patch does a\nbit more, here is what I came up with.\n\n    check-docs: allow excluded subcommands to be in the command-list file\n\n    One of the things this build target makes sure is that all\n    entries in the command-list.txt are about subcommands that still\n    exist in the system (i.e. if a developer removes a subcommand\n    and forgets to remove it from the command list file, it needs to\n    be flagged as an incomplete change), and it is done by comparing\n    the entries in the file against the list of subprograms in\n    $(ALL_COMMANDS) variable.\n\n    However, the latter list is dynamic---not all build contains all\n    the Git subcommands categorized in the command-list.txt file.\n    And such a partial build would falsely trigger the check,\n    complaining that some subcommands are removed but still are\n    listed in the command list file.\n\n    Fix this by teaching the logic to use the EXCLUDED_PROGRAMS list\n    prepared in the previous step.\n\nor something like that, perhaps?\n\nThe same logic to warn about \"removed but listed\" commands that are\nnot built (hence missing from ALL_COMMANDS list) is also fed the\nlist of all documented subcommands by looking at \"make print-man1\"\nin the Documentation directory, so that it can issue \"removed but\ndocumented\" when a developer removes a subcommand but forgets to\nremove its documentation.  Don't we need to teach a similar\ntreatment on that side of the coin?\n\nI am wondering if it makes that easier to instead add EXCLUDED ones\nback to ALL_COMMANDS on the receiving end of the pipe, rather than\nfiltering them out in the sed script that reads from command-list,\ni.e.\n\n\t# revert what this patch did to the upstream of the pipe\n\t(\n\t\tsed ... filters comments ... \\\n\t\t\t-e 's/^/listed /' command-list.txt;\n\t\t$(MAKE) -C Documentation print-man1 |\n\t\tsed ... -e 's/^/documented /'\n\t) | \\\n\twhile read how cmd; \\\n\tdo\n\t\t# instead add them back here\n\t\tcase \" $(patsubst %$X,%,$(ALL_COMMANDS) $(EXCLUDED)) \" in\n\t\t*\" $$cmd \"*) : ok ;;\n\t\t...\n\nThat way, the documentation side can be fixed at the same time as\nthe command-list side of the check that incorrectly reports \"removed\nbut listed\".\n\nIf we go that route, the earlier rewrite of the proposed log message\nI suggested may want to be further updated.  Perhaps by replacing\n\"use the EXCLUDED_PROGRAMS list prepared in the previous step\" with\n\"add the EXCLUDED_PROGRAMS list prepared in the previous step back\nto ALL_COMMANDS list when checking entries from the list of\ndocumented and categorized subcommands.\" or something like that.\n\nThanks.\n"},{"id":"373850","messageId":"xmqqwojvrb13.fsf@gitster-ct.c.googlers.com","threadId":"50926","inReplyTo":"fb3daa6427595b1df24d3664212a704da171c95e.1555070430.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 5/7] check-docs: do not bother checking for legacy scripts' documentation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-15T07:19:04Z","receivedAt":"2019-04-15T07:19:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> Obviously, those `git-legacy-<command>` commands share the documentation\n> with the built-in `git-<command>`, and are not intended to be called\n> directly anyway. So let's not try to ensure that they are documented\n> separately from their built-in versions.\n\nYup.  \n\nThis is the \"other\" loop that goes over the list of ALL_COMMANDS and\nmakes sure each of them has its own documentation page.\n\nLooking good.\n\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>  Makefile | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/Makefile b/Makefile\n> index a5212c64bf..caa20923a4 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -3074,7 +3074,7 @@ check-docs:: Documentation/GIT-EXCLUDED-PROGRAMS\n>  \t\tgit-merge-octopus | git-merge-ours | git-merge-recursive | \\\n>  \t\tgit-merge-resolve | git-merge-subtree | \\\n>  \t\tgit-fsck-objects | git-init-db | \\\n> -\t\tgit-remote-* | git-stage | \\\n> +\t\tgit-remote-* | git-stage | git-legacy-* | \\\n>  \t\tgit-?*--?* ) continue ;; \\\n>  \t\tesac ; \\\n>  \t\ttest -f \"Documentation/$$v.txt\" || \\\n"},{"id":"373873","messageId":"xmqqa7grqsbt.fsf@gitster-ct.c.googlers.com","threadId":"50926","inReplyTo":"411587e4b80bd4e5a1cb9b1ec438cda7a0681465.1555070430.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 7/7] Turn `git serve` into a test helper","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-15T14:03:02Z","receivedAt":"2019-04-15T14:03:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> The `git serve` built-in was introduced in ed10cb952d31 (serve:\n> introduce git-serve, 2018-03-15) as a backend to serve Git protocol v2,\n> probably originally intended to be spawned by `git upload-pack`.\n>\n> However, in the version that the protocol v2 patches made it into core\n> Git, `git upload-pack` calls the `serve()` function directly instead of\n> spawning `git serve`; The only reason in life for `git serve` to survive\n> as a built-in command is to provide a way to test the protocol v2\n> functionality.\n>\n> Meaning that it does not even have to be a built-in that is installed\n> with end-user facing Git installations, but it can be a test helper\n> instead.\n>\n> Let's make it so.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nI've excluded this step from tonight's pushout, as I would want to\nhear from the people on the other side who have (once) thought that\nthis was an addition we would want to have, before we remove/demote\nit.\n\nI do not personally think, as the design of v2 stands, a standalone\n\"serve\" server that \"can serve anything as long as it goes over\nprotocol v2\" makes much sense, but perhaps those who have been doing\nthe v2 work may have different ideas, in which case let's hear what\ntheir plans are.\n\nThanks.\n\n"},{"id":"373879","messageId":"20190415145042.GA27540@sigill.intra.peff.net","threadId":"50926","inReplyTo":"CAPig+cQ3drZ+iE=SkSXTdHVfTxLkPTi=VTJCMJn7LKLxcpC-pQ@mail.gmail.com","subject":"Re: [PATCH 4/7] docs: exclude documentation for commands that have been excluded","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-04-15T14:50:42Z","receivedAt":"2019-04-15T14:50:46Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Apr 15, 2019 at 12:16:51AM -0400, Eric Sunshine wrote:\n\n> On Sun, Apr 14, 2019 at 11:10 PM Junio C Hamano <gitster@pobox.com> wrote:\n> > Eric Sunshine <sunshine@sunshineco.com> writes:\n> > >> +Documentation/GIT-EXCLUDED-PROGRAMS: Makefile config.mak.uname\n> > >> +       $(QUIET_GEN)echo \"EXCLUDED_PROGRAMS := $(EXCLUDED_PROGRAMS)\" >$@\n> > >\n> > > Should this rule also have a dependency upon \"config.mak.autogen\"?\n> >\n> > That is probably a good point.\n> >\n> > > Perhaps like this:\n> > >\n> > > Documentation/GIT-EXCLUDED-PROGRAMS: Makefile $(wildcard config.mak*)\n> >\n> > I'd rather not let changes to \"config.mak-\", which I keep in my\n> > working tree (untracked and disabled copy of config.mak, that can be\n> > readily activated by renaming), be part of dependency rules.\n> >\n> > If we know 'autogen' is the only dependency that optionally can\n> > exist, then depending explicitly on $(wildcard config.mak.autogen)\n> > would be a better alternative.\n> \n> When composing that email, I originally wrote $(wildcard\n> config.mak.autogen) as the suggestion but changed it to the looser\n> $(wildcard config.mak*) when I realized that the developer's own\n> config.mak probably ought to be a dependency, as well. Taking your\n> objection into consideration, we could mention both explicitly:\n> \n>     Documentation/GIT-EXCLUDED-PROGRAMS: Makefile \\\n>         $(wildcard config.mak) $(wildcard config.mak.autogen)\n\nWhat about command-line options that influence the outcome? It sounds\nlike this is the same problem we have in lots of other places (like say,\ncompiler flags being updated), that we solve by generating the proposed\nfile output unconditionally and comparing it to what's on disk.  E.g.,\nsee the way GIT-CFLAGS or GIT-BUILD-OPTIONS is generated.\n\n-Peff\n"},{"id":"373927","messageId":"xmqqwojupp0s.fsf@gitster-ct.c.googlers.com","threadId":"50926","inReplyTo":"20190415145042.GA27540@sigill.intra.peff.net","subject":"Re: [PATCH 4/7] docs: exclude documentation for commands that have been excluded","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-16T04:12:03Z","receivedAt":"2019-04-16T04:12:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> What about command-line options that influence the outcome? It sounds\n> like this is the same problem we have in lots of other places (like say,\n> compiler flags being updated), that we solve by generating the proposed\n> file output unconditionally and comparing it to what's on disk.  E.g.,\n> see the way GIT-CFLAGS or GIT-BUILD-OPTIONS is generated.\n\n;-).\n"},{"id":"373994","messageId":"20190417034621.GA19448@sigill.intra.peff.net","threadId":"50926","inReplyTo":"xmqqa7grqsbt.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 7/7] Turn `git serve` into a test helper","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-04-17T03:46:21Z","receivedAt":"2019-04-17T03:46:25Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Apr 15, 2019 at 11:03:02PM +0900, Junio C Hamano wrote:\n\n> \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\n> writes:\n> \n> > From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> >\n> > The `git serve` built-in was introduced in ed10cb952d31 (serve:\n> > introduce git-serve, 2018-03-15) as a backend to serve Git protocol v2,\n> > probably originally intended to be spawned by `git upload-pack`.\n> >\n> > However, in the version that the protocol v2 patches made it into core\n> > Git, `git upload-pack` calls the `serve()` function directly instead of\n> > spawning `git serve`; The only reason in life for `git serve` to survive\n> > as a built-in command is to provide a way to test the protocol v2\n> > functionality.\n> >\n> > Meaning that it does not even have to be a built-in that is installed\n> > with end-user facing Git installations, but it can be a test helper\n> > instead.\n> >\n> > Let's make it so.\n> >\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> \n> I've excluded this step from tonight's pushout, as I would want to\n> hear from the people on the other side who have (once) thought that\n> this was an addition we would want to have, before we remove/demote\n> it.\n> \n> I do not personally think, as the design of v2 stands, a standalone\n> \"serve\" server that \"can serve anything as long as it goes over\n> protocol v2\" makes much sense, but perhaps those who have been doing\n> the v2 work may have different ideas, in which case let's hear what\n> their plans are.\n\nI too would like to hear more definite comments from people who think\ngit-serve is worth keeping. In the meantime, there's some discussion\nfrom this thread in December:\n\n  https://public-inbox.org/git/20181211104236.GA6899@sigill.intra.peff.net/\n\nespecially this sub-thread:\n\n  https://public-inbox.org/git/20181213195305.249059-1-jonathantanmy@google.com/\n\n(In case you do not feel like reading the whole thing, my opinion there\nis that git-serve is probably not the right direction, and we would do\nwell to demote it as Dscho's patch does).\n\n-Peff\n"},{"id":"373998","messageId":"xmqq36mhkx3z.fsf@gitster-ct.c.googlers.com","threadId":"50926","inReplyTo":"20190417034621.GA19448@sigill.intra.peff.net","subject":"Re: [PATCH 7/7] Turn `git serve` into a test helper","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-17T05:40:48Z","receivedAt":"2019-04-17T05:40:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n>> I do not personally think, as the design of v2 stands, a standalone\n>> \"serve\" server that \"can serve anything as long as it goes over\n>> protocol v2\" makes much sense, but perhaps those who have been doing\n>> the v2 work may have different ideas, in which case let's hear what\n>> their plans are.\n>\n> I too would like to hear more definite comments from people who think\n> git-serve is worth keeping. In the meantime, there's some discussion\n> from this thread in December:\n> ...\n>   https://public-inbox.org/git/20181213195305.249059-1-jonathantanmy@google.com/\n>\n> (In case you do not feel like reading the whole thing, my opinion there\n> is that git-serve is probably not the right direction, and we would do\n> well to demote it as Dscho's patch does).\n\nI guess we are more or less on the same page, then.  I'll let others\nchime in by waiting for a bit more but I won't wait forever ;-).\n\nThanks.\n"},{"id":"374066","messageId":"20190417182200.GQ60888@google.com","threadId":"50926","inReplyTo":"xmqq36mhkx3z.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 7/7] Turn `git serve` into a test helper","fromName":"Josh Steadmon","fromEmail":"steadmon@google.com","sentAt":"2019-04-17T18:22:00Z","receivedAt":"2019-04-17T18:22:10Z","isPatch":true,"sender":{"key":"steadmon@google.com","avatar":"https://avatars.githubusercontent.com/u/2654920?v=4"},"body":"On 2019.04.17 14:40, Junio C Hamano wrote:\n> Jeff King <peff@peff.net> writes:\n> \n> >> I do not personally think, as the design of v2 stands, a standalone\n> >> \"serve\" server that \"can serve anything as long as it goes over\n> >> protocol v2\" makes much sense, but perhaps those who have been doing\n> >> the v2 work may have different ideas, in which case let's hear what\n> >> their plans are.\n> >\n> > I too would like to hear more definite comments from people who think\n> > git-serve is worth keeping. In the meantime, there's some discussion\n> > from this thread in December:\n> > ...\n> >   https://public-inbox.org/git/20181213195305.249059-1-jonathantanmy@google.com/\n> >\n> > (In case you do not feel like reading the whole thing, my opinion there\n> > is that git-serve is probably not the right direction, and we would do\n> > well to demote it as Dscho's patch does).\n> \n> I guess we are more or less on the same page, then.  I'll let others\n> chime in by waiting for a bit more but I won't wait forever ;-).\n> \n> Thanks.\n\nFWIW I used git-serve a fair amount while working on V2 support for\narchiving, and everything I did with it would have been just as easy\nwith a test helper as with a builtin. So I have no objections to this\nchange.\n"},{"id":"374083","messageId":"xmqqy348gjm9.fsf@gitster-ct.c.googlers.com","threadId":"50926","inReplyTo":"20190417182200.GQ60888@google.com","subject":"Re: [PATCH 7/7] Turn `git serve` into a test helper","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-18T01:58:06Z","receivedAt":"2019-04-18T01:58:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Josh Steadmon <steadmon@google.com> writes:\n\n> On 2019.04.17 14:40, Junio C Hamano wrote:\n>> Jeff King <peff@peff.net> writes:\n>>  ...\n>> I guess we are more or less on the same page, then.  I'll let others\n>> chime in by waiting for a bit more but I won't wait forever ;-).\n>> \n>> Thanks.\n>\n> FWIW I used git-serve a fair amount while working on V2 support for\n> archiving, and everything I did with it would have been just as easy\n> with a test helper as with a builtin. So I have no objections to this\n> change.\n\nWell, let's queue the final step together with the others, than.\n\nThanks, all.\n"},{"id":"374102","messageId":"nycvar.QRO.7.76.6.1904181346050.46@tvgsbejvaqbjf.bet","threadId":"50926","inReplyTo":"xmqqv9zfsq31.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 1/7] remote-testgit: move it into the support directory for t5801","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-04-18T11:46:32Z","receivedAt":"2019-04-18T11:46:35Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Mon, 15 Apr 2019, Junio C Hamano wrote:\n\n> \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\n> writes:\n>\n> > @@ -657,8 +656,6 @@ SCRIPT_PERL += git-svn.perl\n> >\n> >  SCRIPT_PYTHON += git-p4.py\n> >\n> > -NO_INSTALL += git-remote-testgit\n> > -\n>\n> The line lost here was the last one that updated the value of\n> NO_INSTALL, so we should be able to lose all the mentions of the\n> make variable now.\n\nSure, I added a separate commit to make it so.\n\nThanks,\nDscho\n"},{"id":"374103","messageId":"nycvar.QRO.7.76.6.1904181403330.46@tvgsbejvaqbjf.bet","threadId":"50926","inReplyTo":"xmqqo957sq2g.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 2/7] help -a: do not list commands that are excluded from the build","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-04-18T12:06:28Z","receivedAt":"2019-04-18T12:06:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Mon, 15 Apr 2019, Junio C Hamano wrote:\n\n> \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\n> writes:\n>\n> >  SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\\\n> >  \t$(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\\\n> > diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh\n> > index 709d67405b..7867b99d19 100755\n> > --- a/generate-cmdlist.sh\n> > +++ b/generate-cmdlist.sh\n> > @@ -6,7 +6,7 @@ die () {\n> >  }\n> >\n> >  command_list () {\n> > -\tgrep -v '^#' \"$1\"\n> > +\teval grep -ve '^#' $exclude_programs \"$1\"\n>\n> The original protects against $IFS in the filename given as $1, but\n> with the eval that is no longer true.  We have been feeding the\n> constant \"command-list.txt\" to the program since its inception, and\n> I do not expect it to change, so this regression in defensiveness\n> does not matter in practice.  Also because # is prefixed with ^, the\n> unintended loss of quotes around it when the eval makes the shell\n> re-parse the generated command line would not make the remainder\n> into a comment.\n>\n> But it does look brittle, and smells like a trap for less\n> experienced shell programmers to blindly copy & paste & tweak\n> without understanding what is going on, leading to bugs.\n>\n> \teval \"grep -v -e '^#' $exclude_programs\" <\"$1\"\n>\n> or something like that, perhaps?\n\nYes! Thank you.\n\n> > @@ -93,6 +93,14 @@ EOF\n> >  EOF\n> >  }\n> >\n> > +exclude_programs=\n> > +while test \"a$1\" = \"a--exclude-program\"\n>\n> s/a/z/g; if you want to pretend to be old-fashioned, but s/a//g;\n> should be sufficient in the modern world.\n\nDon't you know, I always used \"a\" without realizing. You can see my\nmisdeed even in git-rebase--preserve-merges.sh. I won't fix it there,\nthough, as I hope that it'll be gone soon enough.\n\nWill be fixed in the next iteration I send.\n\nThanks,\nDscho\n"},{"id":"374104","messageId":"nycvar.QRO.7.76.6.1904181416250.46@tvgsbejvaqbjf.bet","threadId":"50926","inReplyTo":"xmqqa7grqsbt.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 7/7] Turn `git serve` into a test helper","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-04-18T12:17:12Z","receivedAt":"2019-04-18T12:17:16Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Mon, 15 Apr 2019, Junio C Hamano wrote:\n\n> \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\n> writes:\n>\n> > From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> >\n> > The `git serve` built-in was introduced in ed10cb952d31 (serve:\n> > introduce git-serve, 2018-03-15) as a backend to serve Git protocol v2,\n> > probably originally intended to be spawned by `git upload-pack`.\n> >\n> > However, in the version that the protocol v2 patches made it into core\n> > Git, `git upload-pack` calls the `serve()` function directly instead of\n> > spawning `git serve`; The only reason in life for `git serve` to survive\n> > as a built-in command is to provide a way to test the protocol v2\n> > functionality.\n> >\n> > Meaning that it does not even have to be a built-in that is installed\n> > with end-user facing Git installations, but it can be a test helper\n> > instead.\n> >\n> > Let's make it so.\n> >\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> I've excluded this step from tonight's pushout, as I would want to\n                                         ^^^^^^^\n\nWould you be surprised that I first read this as \"pu shout\"?\n\n> hear from the people on the other side who have (once) thought that\n> this was an addition we would want to have, before we remove/demote\n> it.\n>\n> I do not personally think, as the design of v2 stands, a standalone\n> \"serve\" server that \"can serve anything as long as it goes over\n> protocol v2\" makes much sense, but perhaps those who have been doing\n> the v2 work may have different ideas, in which case let's hear what\n> their plans are.\n\nAs this has been resolved in the meantime, I'll just leave it as-is.\n\nCiao,\nDscho\n"},{"id":"374105","messageId":"nycvar.QRO.7.76.6.1904181424330.46@tvgsbejvaqbjf.bet","threadId":"50926","inReplyTo":"xmqq4l6zsplq.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 3/7] check-docs: do not pretend that commands are listed which are excluded","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-04-18T12:41:28Z","receivedAt":"2019-04-18T12:41:30Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\n\nOn Mon, 15 Apr 2019, Junio C Hamano wrote:\n\n> \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\n> writes:\n>\n> > From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > Subject: Re: [PATCH 3/7] check-docs: do not pretend that commands are listed which are excluded\n>\n> Sorry, but I cannot quite parse the title.  I am guessing that you\n> meant \"do not pretend that commands, which are excluded, are\n> listed\", which is a mouthful but at least can be parseable X-<.\n\nWell, what can I say, you're right.\n\n> > In the previous commit, we taught `git help -a` to stop listing commands\n> > that are excluded from the build.\n> >\n> > In this commit, we stop `check-docs` from claiming that those commands\n> > are listed.\n>\n> I think the result would become more readable (and I suspect that it\n> would at the same time make the title parseable, but I am not sure\n> as I do not quite know what the title wants to say in the first\n> place) if you clarified the verb \"list\" here perhaps with \"listed in\n> command-list.txt\".\n\nI was actually coming from the `help -a` side. But that is not obvious\nfrom the commit message, nor does that Makefile target handle that `help\n-a` output in the first place.\n\n> The output from the sed script that filters the contents of the\n> command-list.txt file is compared with the ALL_COMMANDS list, and\n> we complain if an entry in command-list.txt is no longer in the\n> ALL_COMMANDS list (i.e. a developer removed a stale command but\n> forgot to remove it from the command-list.txt) [*1*].\n>\n> The step 2/7 marked the subcommands that ought to be on ALL_COMMANDS\n> for the purpose of this check but that are excluded from the build,\n> as a preparation for this step, and this step 3/7 uses the list of\n> excluded ones to avoid complaining them being in the categorized\n> list of subcommands (i.e. command-list.txt).\n\nRight.\n\n> We can read that \"stop listing them\" is done as means to some end,\n> but it is unclear what the end-user/developer visible effect this\n> step intends to achieve.  After thinking about what the patch does a\n> bit more, here is what I came up with.\n>\n>     check-docs: allow excluded subcommands to be in the command-list file\n>\n>     One of the things this build target makes sure is that all\n>     entries in the command-list.txt are about subcommands that still\n>     exist in the system (i.e. if a developer removes a subcommand\n>     and forgets to remove it from the command list file, it needs to\n>     be flagged as an incomplete change), and it is done by comparing\n>     the entries in the file against the list of subprograms in\n>     $(ALL_COMMANDS) variable.\n>\n>     However, the latter list is dynamic---not all build contains all\n>     the Git subcommands categorized in the command-list.txt file.\n>     And such a partial build would falsely trigger the check,\n>     complaining that some subcommands are removed but still are\n>     listed in the command list file.\n>\n>     Fix this by teaching the logic to use the EXCLUDED_PROGRAMS list\n>     prepared in the previous step.\n>\n> or something like that, perhaps?\n\nI rephrased this yet again (to reflect the way I speak):\n\n\tcheck-docs: allow command-list.txt to contain excluded commands\n\n\tAmong other things, the `check-docs` target ensures that\n\t`command-list.txt` no longer contains commands that were dropped (or\n\tthat were never added in the first place).\n\n\tTo do so, it compares the list of commands from that file to the\n\tcommands listed in `$(ALL_COMMANDS)`.\n\n\tHowever, some build options exclude commands from the latter. Fix the\n\ttarget to handle this situation correctly by taking the just-introduced\n\t`$(EXCLUDED_PROGRAMS)` into account.\n\n> The same logic to warn about \"removed but listed\" commands that are\n> not built (hence missing from ALL_COMMANDS list) is also fed the\n> list of all documented subcommands by looking at \"make print-man1\"\n> in the Documentation directory, so that it can issue \"removed but\n> documented\" when a developer removes a subcommand but forgets to\n> remove its documentation.  Don't we need to teach a similar\n> treatment on that side of the coin?\n\nYep, that's what the later patch \"docs: exclude documentation for commands\nthat have been excluded\" is all about.\n\n> I am wondering if it makes that easier to instead add EXCLUDED ones\n> back to ALL_COMMANDS on the receiving end of the pipe, rather than\n> filtering them out in the sed script that reads from command-list,\n> i.e.\n>\n> \t# revert what this patch did to the upstream of the pipe\n> \t(\n> \t\tsed ... filters comments ... \\\n> \t\t\t-e 's/^/listed /' command-list.txt;\n> \t\t$(MAKE) -C Documentation print-man1 |\n> \t\tsed ... -e 's/^/documented /'\n> \t) | \\\n> \twhile read how cmd; \\\n> \tdo\n> \t\t# instead add them back here\n> \t\tcase \" $(patsubst %$X,%,$(ALL_COMMANDS) $(EXCLUDED)) \" in\n> \t\t*\" $$cmd \"*) : ok ;;\n> \t\t...\n>\n> That way, the documentation side can be fixed at the same time as\n> the command-list side of the check that incorrectly reports \"removed\n> but listed\".\n\nI did exactly that, thank you for that suggestion.\n\nThanks,\nDscho\n"},{"id":"374106","messageId":"nycvar.QRO.7.76.6.1904181505520.46@tvgsbejvaqbjf.bet","threadId":"50926","inReplyTo":"20190415145042.GA27540@sigill.intra.peff.net","subject":"Re: [PATCH 4/7] docs: exclude documentation for commands that have been excluded","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-04-18T13:06:56Z","receivedAt":"2019-04-18T13:07:06Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Peff,\n\nOn Mon, 15 Apr 2019, Jeff King wrote:\n\n> On Mon, Apr 15, 2019 at 12:16:51AM -0400, Eric Sunshine wrote:\n>\n> > On Sun, Apr 14, 2019 at 11:10 PM Junio C Hamano <gitster@pobox.com> wrote:\n> > > Eric Sunshine <sunshine@sunshineco.com> writes:\n> > > >> +Documentation/GIT-EXCLUDED-PROGRAMS: Makefile config.mak.uname\n> > > >> +       $(QUIET_GEN)echo \"EXCLUDED_PROGRAMS := $(EXCLUDED_PROGRAMS)\" >$@\n> > > >\n> > > > Should this rule also have a dependency upon \"config.mak.autogen\"?\n> > >\n> > > That is probably a good point.\n> > >\n> > > > Perhaps like this:\n> > > >\n> > > > Documentation/GIT-EXCLUDED-PROGRAMS: Makefile $(wildcard config.mak*)\n> > >\n> > > I'd rather not let changes to \"config.mak-\", which I keep in my\n> > > working tree (untracked and disabled copy of config.mak, that can be\n> > > readily activated by renaming), be part of dependency rules.\n> > >\n> > > If we know 'autogen' is the only dependency that optionally can\n> > > exist, then depending explicitly on $(wildcard config.mak.autogen)\n> > > would be a better alternative.\n> >\n> > When composing that email, I originally wrote $(wildcard\n> > config.mak.autogen) as the suggestion but changed it to the looser\n> > $(wildcard config.mak*) when I realized that the developer's own\n> > config.mak probably ought to be a dependency, as well. Taking your\n> > objection into consideration, we could mention both explicitly:\n> >\n> >     Documentation/GIT-EXCLUDED-PROGRAMS: Makefile \\\n> >         $(wildcard config.mak) $(wildcard config.mak.autogen)\n>\n> What about command-line options that influence the outcome? It sounds\n> like this is the same problem we have in lots of other places (like say,\n> compiler flags being updated), that we solve by generating the proposed\n> file output unconditionally and comparing it to what's on disk.  E.g.,\n> see the way GIT-CFLAGS or GIT-BUILD-OPTIONS is generated.\n\n*Sigh*\n\nI really did not want to do that because I thought it would be tedious and\nmore complicated and result in a longer patch.\n\nWell, don't you know. The patch is actually *a lot* shorter now. So much\nso that range-diff thinks it is a different commit ;-)\n\nThanks for the reality check/prod,\nDscho\n"},{"id":"374107","messageId":"nycvar.QRO.7.76.6.1904181507240.46@tvgsbejvaqbjf.bet","threadId":"50926","inReplyTo":"CAPig+cSHJ_g=KGBL2qoJK7Ddv6QhoC2Fq=2dyRF1qexAv63RiA@mail.gmail.com","subject":"Re: [PATCH 4/7] docs: exclude documentation for commands that have been excluded","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-04-18T13:08:06Z","receivedAt":"2019-04-18T13:08:12Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Eric & Junio,\n\nOn Mon, 15 Apr 2019, Eric Sunshine wrote:\n\n> On Mon, Apr 15, 2019 at 12:16 AM Eric Sunshine <sunshine@sunshineco.com> wrote:\n> > When composing that email, I originally wrote $(wildcard\n> > config.mak.autogen) as the suggestion but changed it to the looser\n> > $(wildcard config.mak*) when I realized that the developer's own\n> > config.mak probably ought to be a dependency, as well. Taking your\n> > objection into consideration, we could mention both explicitly:\n> >\n> >     Documentation/GIT-EXCLUDED-PROGRAMS: Makefile \\\n> >         $(wildcard config.mak) $(wildcard config.mak.autogen)\n>\n> Bleh, I forgot config.mak.uname from Dscho's original patch.\n>\n>     Documentation/GIT-EXCLUDED-PROGRAMS: Makefile config.mak.uname \\\n>         $(wildcard config.mak) $(wildcard config.mak.autogen)\n\nRight.\n\nI had that locally in the meantime, but based on Peff's suggestion went\nfor a GIT-CFLAGS like approach instead.\n\nCiao,\nDscho\n"},{"id":"374108","messageId":"pull.168.v2.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.git.gitgitgadget@gmail.com","subject":"[PATCH v2 0/8] Assorted Documentation-related fixes","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-18T13:16:37Z","receivedAt":"2019-04-18T13:16:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"While working on better support for make check-docs on Windows, I noticed a\ncouple more things, e.g. some \"commands\" were reported as being listed but\nnot built, e.g. gitcli (i.e. the parts of command-list.txt that are marked\nas \"guide\").\n\nThis patch series cleans up those loose ends: after this, make check-docs \nreports no issues on Windows.\n\nChanges since v1:\n\n * There is now an extra patch that gets rid of the NO_INSTALL variable in\n   the Makefile altogether.\n * The generate-cmdlist.sh patch now results in more robust code (thanks,\n   Junio!).\n * Patch 2/7 has a much better commit message now, and instead of filtering\n   out excluded commands from the command-list.txt, it expects excluded\n   commands by looking not only at $(ALL_COMMANDS) but also at \n   $(EXCLUDED_PROGRAMS).\n * Instead of the fragile logic to generate \n   Documentation/GIT-EXCLUDED-PROGRAMS that I hoped would let me get away\n   with less work, I now imitate the logic of GIT-CFLAGS (and the resulting\n   patch is actually a lot easier to read).\n\nJohannes Schindelin (8):\n  remote-testgit: move it into the support directory for t5801\n  Makefile: drop the NO_INSTALL variable\n  help -a: do not list commands that are excluded from the build\n  check-docs: allow command-list.txt to contain excluded commands\n  docs: exclude documentation for commands that have been excluded\n  check-docs: do not bother checking for legacy scripts' documentation\n  test-tool: handle the `-C <directory>` option just like `git`\n  Turn `git serve` into a test helper\n\n .gitignore                                    |  1 -\n Documentation/.gitignore                      |  1 +\n Documentation/Makefile                        |  3 ++\n Makefile                                      | 53 +++++++++++--------\n builtin.h                                     |  1 -\n generate-cmdlist.sh                           | 10 +++-\n git.c                                         |  1 -\n builtin/serve.c => t/helper/test-serve-v2.c   |  7 +--\n t/helper/test-tool.c                          | 20 +++++++\n t/helper/test-tool.h                          |  1 +\n t/t5701-git-serve.sh                          | 32 ++++++-----\n t/t5702-protocol-v2.sh                        |  5 +-\n t/t5703-upload-pack-ref-in-want.sh            | 16 +++---\n t/t5801-remote-helpers.sh                     |  2 +\n .../t5801/git-remote-testgit                  |  0\n 15 files changed, 101 insertions(+), 52 deletions(-)\n rename builtin/serve.c => t/helper/test-serve-v2.c (81%)\n rename git-remote-testgit.sh => t/t5801/git-remote-testgit (100%)\n\n\nbase-commit: 5ee42463399ca3cc75b7e6e4368a3a5df5b010f2\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-168%2Fdscho%2Fdocs-misc-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-168/dscho/docs-misc-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/168\n\nRange-diff vs v1:\n\n 1:  81c08b178b = 1:  81c08b178b remote-testgit: move it into the support directory for t5801\n -:  ---------- > 2:  fda0b10c84 Makefile: drop the NO_INSTALL variable\n 2:  7dc5293e9e ! 3:  9b498a6f21 help -a: do not list commands that are excluded from the build\n     @@ -70,7 +70,7 @@\n       \n       command_list () {\n      -\tgrep -v '^#' \"$1\"\n     -+\teval grep -ve '^#' $exclude_programs \"$1\"\n     ++\teval \"grep -ve '^#' $exclude_programs\" <\"$1\"\n       }\n       \n       get_categories () {\n     @@ -79,7 +79,7 @@\n       }\n       \n      +exclude_programs=\n     -+while test \"a$1\" = \"a--exclude-program\"\n     ++while test \"--exclude-program\" = \"$1\"\n      +do\n      +\tshift\n      +\texclude_programs=\"$exclude_programs -e \\\"^$1 \\\"\"\n 3:  96ced7e17c < -:  ---------- check-docs: do not pretend that commands are listed which are excluded\n 4:  31d8e43cbf < -:  ---------- docs: exclude documentation for commands that have been excluded\n -:  ---------- > 4:  ac3670a805 check-docs: allow command-list.txt to contain excluded commands\n -:  ---------- > 5:  f8d133c597 docs: exclude documentation for commands that have been excluded\n 5:  fb3daa6427 = 6:  05d4ad62d6 check-docs: do not bother checking for legacy scripts' documentation\n 6:  2e19f538bc = 7:  cf73021574 test-tool: handle the `-C <directory>` option just like `git`\n 7:  411587e4b8 = 8:  88a5ab2332 Turn `git serve` into a test helper\n\n-- \ngitgitgadget\n"},{"id":"374109","messageId":"81c08b178be6329d51586fa9d615063d3c6f9625.1555593396.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.v2.git.gitgitgadget@gmail.com","subject":"[PATCH v2 1/8] remote-testgit: move it into the support directory for t5801","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-18T13:16:38Z","receivedAt":"2019-04-18T13:16:43Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe `git-remote-testgit` script is really only used in\n`t5801-remote-helpers.sh`. It does not even contain any `@@<MAGIC>@@`\nplaceholders that would need to be interpolated via `make\ngit-remote-testgit`.\n\nLet's just move it to a new home, decluttering the top-level directory\nand clarifying that this is just a test helper, not an official Git\ncommand that we would want to ever support.\n\nSuggested by Ævar Arnfjörð Bjarmason.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .gitignore                                          | 1 -\n Makefile                                            | 3 ---\n t/t5801-remote-helpers.sh                           | 2 ++\n git-remote-testgit.sh => t/t5801/git-remote-testgit | 0\n 4 files changed, 2 insertions(+), 4 deletions(-)\n rename git-remote-testgit.sh => t/t5801/git-remote-testgit (100%)\n\ndiff --git a/.gitignore b/.gitignore\nindex 7374587f9d..de8fc2f5b1 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -135,7 +135,6 @@\n /git-remote-ftps\n /git-remote-fd\n /git-remote-ext\n-/git-remote-testgit\n /git-remote-testpy\n /git-remote-testsvn\n /git-repack\ndiff --git a/Makefile b/Makefile\nindex 8654c130f8..26f8ed2228 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -633,7 +633,6 @@ SCRIPT_SH += git-merge-resolve.sh\n SCRIPT_SH += git-mergetool.sh\n SCRIPT_SH += git-quiltimport.sh\n SCRIPT_SH += git-legacy-rebase.sh\n-SCRIPT_SH += git-remote-testgit.sh\n SCRIPT_SH += git-request-pull.sh\n SCRIPT_SH += git-stash.sh\n SCRIPT_SH += git-submodule.sh\n@@ -657,8 +656,6 @@ SCRIPT_PERL += git-svn.perl\n \n SCRIPT_PYTHON += git-p4.py\n \n-NO_INSTALL += git-remote-testgit\n-\n # Generated files for scripts\n SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))\n SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))\ndiff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh\nindex aaaa722cca..d04f8007e0 100755\n--- a/t/t5801-remote-helpers.sh\n+++ b/t/t5801-remote-helpers.sh\n@@ -8,6 +8,8 @@ test_description='Test remote-helper import and export commands'\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-gpg.sh\n \n+PATH=\"$TEST_DIRECTORY/t5801:$PATH\"\n+\n compare_refs() {\n \tgit --git-dir=\"$1/.git\" rev-parse --verify $2 >expect &&\n \tgit --git-dir=\"$3/.git\" rev-parse --verify $4 >actual &&\ndiff --git a/git-remote-testgit.sh b/t/t5801/git-remote-testgit\nsimilarity index 100%\nrename from git-remote-testgit.sh\nrename to t/t5801/git-remote-testgit\n-- \ngitgitgadget\n\n"},{"id":"374110","messageId":"fda0b10c84390d781d6d21a52c891dc5b54ef8d1.1555593396.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.v2.git.gitgitgadget@gmail.com","subject":"[PATCH v2 2/8] Makefile: drop the NO_INSTALL variable","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-18T13:16:39Z","receivedAt":"2019-04-18T13:16:44Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe last user was just removed; There is no longer any need to carry it\naround. Should we ever run into a need for it again, it is easy enough\nto revert this commit.\n\nIt is unlikely, though, that we need `NO_INSTALL` again: as we saw with\nthe just-removed item, `git-remote-testgit`, we have better locations\nto put executables and scripts that we do not want to install, e.g.\na subdirectory in `t/`, or `contrib/`.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Makefile | 21 ++++++++-------------\n 1 file changed, 8 insertions(+), 13 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 26f8ed2228..f5be2f633e 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -661,10 +661,6 @@ SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))\n SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))\n SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))\n \n-SCRIPT_SH_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_SH_GEN))\n-SCRIPT_PERL_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PERL_GEN))\n-SCRIPT_PYTHON_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PYTHON_GEN))\n-\n # Individual rules to allow e.g.\n # \"make -C ../.. SCRIPT_PERL=contrib/foo/bar.perl build-perl-script\"\n # from subdirectories like contrib/*/\n@@ -674,11 +670,11 @@ build-sh-script: $(SCRIPT_SH_GEN)\n build-python-script: $(SCRIPT_PYTHON_GEN)\n \n .PHONY: install-perl-script install-sh-script install-python-script\n-install-sh-script: $(SCRIPT_SH_INS)\n+install-sh-script: $(SCRIPT_SH_GEN)\n \t$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n-install-perl-script: $(SCRIPT_PERL_INS)\n+install-perl-script: $(SCRIPT_PERL_GEN)\n \t$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n-install-python-script: $(SCRIPT_PYTHON_INS)\n+install-python-script: $(SCRIPT_PYTHON_GEN)\n \t$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \n .PHONY: clean-perl-script clean-sh-script clean-python-script\n@@ -689,9 +685,9 @@ clean-perl-script:\n clean-python-script:\n \t$(RM) $(SCRIPT_PYTHON_GEN)\n \n-SCRIPTS = $(SCRIPT_SH_INS) \\\n-\t  $(SCRIPT_PERL_INS) \\\n-\t  $(SCRIPT_PYTHON_INS) \\\n+SCRIPTS = $(SCRIPT_SH_GEN) \\\n+\t  $(SCRIPT_PERL_GEN) \\\n+\t  $(SCRIPT_PYTHON_GEN) \\\n \t  git-instaweb\n \n ETAGS_TARGET = TAGS\n@@ -2683,7 +2679,6 @@ endif\n test_bindir_programs := $(patsubst %,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X) $(BINDIR_PROGRAMS_NO_X) $(TEST_PROGRAMS_NEED_X))\n \n all:: $(TEST_PROGRAMS) $(test_bindir_programs)\n-all:: $(NO_INSTALL)\n \n bin-wrappers/%: wrap-for-bin.sh\n \t@mkdir -p bin-wrappers\n@@ -2967,7 +2962,7 @@ rpm::\n \n artifacts-tar:: $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS) \\\n \t\tGIT-BUILD-OPTIONS $(TEST_PROGRAMS) $(test_bindir_programs) \\\n-\t\t$(NO_INSTALL) $(MOFILES)\n+\t\t$(MOFILES)\n \t$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) \\\n \t\tSHELL_PATH='$(SHELL_PATH_SQ)' PERL_PATH='$(PERL_PATH_SQ)'\n \ttest -n \"$(ARTIFACTS_DIRECTORY)\"\n@@ -3016,7 +3011,7 @@ clean: profile-clean coverage-clean cocciclean\n \t$(RM) $(OBJECTS)\n \t$(RM) $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB)\n \t$(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X\n-\t$(RM) $(TEST_PROGRAMS) $(NO_INSTALL)\n+\t$(RM) $(TEST_PROGRAMS)\n \t$(RM) $(FUZZ_PROGRAMS)\n \t$(RM) -r bin-wrappers $(dep_dirs)\n \t$(RM) -r po/build/\n-- \ngitgitgadget\n\n"},{"id":"374112","messageId":"9b498a6f218e323306afeeb791ece93510bad746.1555593396.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.v2.git.gitgitgadget@gmail.com","subject":"[PATCH v2 3/8] help -a: do not list commands that are excluded from the build","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-18T13:16:40Z","receivedAt":"2019-04-18T13:16:45Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWhen built with NO_CURL or with NO_UNIX_SOCKETS, some commands are\nskipped from the build. It does not make sense to list them in the\noutput of `git help -a`, so let's just not.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Makefile            | 14 ++++++++++++--\n generate-cmdlist.sh | 10 +++++++++-\n 2 files changed, 21 insertions(+), 3 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex f5be2f633e..e7bcfcaae9 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -611,6 +611,7 @@ FUZZ_PROGRAMS =\n LIB_OBJS =\n PROGRAM_OBJS =\n PROGRAMS =\n+EXCLUDED_PROGRAMS =\n SCRIPT_PERL =\n SCRIPT_PYTHON =\n SCRIPT_SH =\n@@ -1319,6 +1320,7 @@ ifdef NO_CURL\n \tREMOTE_CURL_PRIMARY =\n \tREMOTE_CURL_ALIASES =\n \tREMOTE_CURL_NAMES =\n+\tEXCLUDED_PROGRAMS += git-http-fetch git-http-push\n else\n \tifdef CURLDIR\n \t\t# Try \"-Wl,-rpath=$(CURLDIR)/$(lib)\" in such a case.\n@@ -1343,7 +1345,11 @@ endif\n \tifeq \"$(curl_check)\" \"070908\"\n \t\tifndef NO_EXPAT\n \t\t\tPROGRAM_OBJS += http-push.o\n+\t\telse\n+\t\t\tEXCLUDED_PROGRAMS += git-http-push\n \t\tendif\n+\telse\n+\t\tEXCLUDED_PROGRAMS += git-http-push\n \tendif\n \tcurl_check := $(shell (echo 072200; $(CURL_CONFIG) --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)\n \tifeq \"$(curl_check)\" \"072200\"\n@@ -1589,7 +1595,9 @@ ifdef NO_INET_PTON\n \tLIB_OBJS += compat/inet_pton.o\n \tBASIC_CFLAGS += -DNO_INET_PTON\n endif\n-ifndef NO_UNIX_SOCKETS\n+ifdef NO_UNIX_SOCKETS\n+\tEXCLUDED_PROGRAMS += git-credential-cache git-credential-cache--daemon\n+else\n \tLIB_OBJS += unix-socket.o\n \tPROGRAM_OBJS += credential-cache.o\n \tPROGRAM_OBJS += credential-cache--daemon.o\n@@ -2108,7 +2116,9 @@ $(BUILT_INS): git$X\n command-list.h: generate-cmdlist.sh command-list.txt\n \n command-list.h: $(wildcard Documentation/git*.txt) Documentation/*config.txt Documentation/config/*.txt\n-\t$(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh command-list.txt >$@+ && mv $@+ $@\n+\t$(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh \\\n+\t\t$(patsubst %,--exclude-program %,$(EXCLUDED_PROGRAMS)) \\\n+\t\tcommand-list.txt >$@+ && mv $@+ $@\n \n SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\\\n \t$(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\\\ndiff --git a/generate-cmdlist.sh b/generate-cmdlist.sh\nindex 709d67405b..71158f7d8b 100755\n--- a/generate-cmdlist.sh\n+++ b/generate-cmdlist.sh\n@@ -6,7 +6,7 @@ die () {\n }\n \n command_list () {\n-\tgrep -v '^#' \"$1\"\n+\teval \"grep -ve '^#' $exclude_programs\" <\"$1\"\n }\n \n get_categories () {\n@@ -93,6 +93,14 @@ EOF\n EOF\n }\n \n+exclude_programs=\n+while test \"--exclude-program\" = \"$1\"\n+do\n+\tshift\n+\texclude_programs=\"$exclude_programs -e \\\"^$1 \\\"\"\n+\tshift\n+done\n+\n echo \"/* Automatically generated by generate-cmdlist.sh */\n struct cmdname_help {\n \tconst char *name;\n-- \ngitgitgadget\n\n"},{"id":"374111","messageId":"ac3670a8052c9b3ae9bfc383c6a4255128b8ff1d.1555593396.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.v2.git.gitgitgadget@gmail.com","subject":"[PATCH v2 4/8] check-docs: allow command-list.txt to contain excluded commands","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-18T13:16:42Z","receivedAt":"2019-04-18T13:16:47Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nAmong other things, the `check-docs` target ensures that\n`command-list.txt` no longer contains commands that were dropped (or\nthat were never added in the first place).\n\nTo do so, it compares the list of commands from that file to the\ncommands listed in `$(ALL_COMMANDS)`.\n\nHowever, some build options exclude commands from the latter. Fix the\ntarget to handle this situation correctly by taking the just-introduced\n`$(EXCLUDED_PROGRAMS)` into account.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Makefile | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex e7bcfcaae9..d83104d884 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -3089,7 +3089,7 @@ check-docs::\n \t\t    -e 's/\\.txt//'; \\\n \t) | while read how cmd; \\\n \tdo \\\n-\t\tcase \" $(patsubst %$X,%,$(ALL_COMMANDS)) \" in \\\n+\t\tcase \" $(patsubst %$X,%,$(ALL_COMMANDS) $(EXCLUDED_PROGRAMS)) \" in \\\n \t\t*\" $$cmd \"*)\t;; \\\n \t\t*) echo \"removed but $$how: $$cmd\" ;; \\\n \t\tesac; \\\n-- \ngitgitgadget\n\n"},{"id":"374114","messageId":"f8d133c59725938afa85f6be349c2bba05fe98e7.1555593396.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.v2.git.gitgitgadget@gmail.com","subject":"[PATCH v2 5/8] docs: exclude documentation for commands that have been excluded","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-18T13:16:44Z","receivedAt":"2019-04-18T13:16:50Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWhen building with certain build options, some commands are excluded\nfrom the build. For example, `git-credential-cache` is skipped when\nbuilding with `NO_UNIX_SOCKETS`.\n\nLet's not build or package documentation for those excluded commands.\n\nThis issue was pointed out rightfully when running `make check-docs` on\nWindows, where we do not yet have Unix sockets, and therefore the\n`credential-cache` command is excluded (yet its documentation was built\nand shipped).\n\nNote: building the documentation via `make -C Documentation` leaves the\nbuild system with no way to determine which commands have been\nexcluded. If called thusly, we gracefully fail to exclude their\ndocumentation. Only when building the documentation via the top-level\nMakefile will it get excluded properly, or after building\n`Documentation/GIT-EXCLUDED-PROGRAMS` manually.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Documentation/.gitignore | 1 +\n Documentation/Makefile   | 3 +++\n Makefile                 | 9 +++++++++\n 3 files changed, 13 insertions(+)\n\ndiff --git a/Documentation/.gitignore b/Documentation/.gitignore\nindex 3ef54e0adb..ea27148c59 100644\n--- a/Documentation/.gitignore\n+++ b/Documentation/.gitignore\n@@ -13,3 +13,4 @@ mergetools-*.txt\n manpage-base-url.xsl\n SubmittingPatches.txt\n tmp-doc-diff/\n+/GIT-EXCLUDED-PROGRAMS\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex af0e2cf11a..e22ea2f57c 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -7,7 +7,10 @@ ARTICLES =\n SP_ARTICLES =\n OBSOLETE_HTML =\n \n+-include GIT-EXCLUDED-PROGRAMS\n+\n MAN1_TXT += $(filter-out \\\n+\t\t$(patsubst %,%.txt,$(EXCLUDED_PROGRAMS)) \\\n \t\t$(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \\\n \t\t$(wildcard git-*.txt))\n MAN1_TXT += git.txt\ndiff --git a/Makefile b/Makefile\nindex d83104d884..6f90cec590 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2451,6 +2451,14 @@ $(VCSSVN_LIB): $(VCSSVN_OBJS)\n \n export DEFAULT_EDITOR DEFAULT_PAGER\n \n+Documentation/GIT-EXCLUDED-PROGRAMS: FORCE\n+\t@EXCLUDED='EXCLUDED_PROGRAMS := $(EXCLUDED_PROGRAMS)'; \\\n+\t    if test x\"$$EXCLUDED\" != \\\n+\t\tx\"`cat Documentation/GIT-EXCLUDED-PROGRAMS 2>/dev/null`\" ; then \\\n+\t\techo >&2 \"    * new documentation flags\"; \\\n+\t\techo \"$$EXCLUDED\" >Documentation/GIT-EXCLUDED-PROGRAMS; \\\n+            fi\n+\n .PHONY: doc man man-perl html info pdf\n doc: man-perl\n \t$(MAKE) -C Documentation all\n@@ -3030,6 +3038,7 @@ clean: profile-clean coverage-clean cocciclean\n \t$(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz\n \t$(RM) $(htmldocs).tar.gz $(manpages).tar.gz\n \t$(MAKE) -C Documentation/ clean\n+\t$(RM) Documentation/GIT-EXCLUDED-PROGRAMS\n ifndef NO_PERL\n \t$(MAKE) -C gitweb clean\n \t$(RM) -r perl/build/\n-- \ngitgitgadget\n\n"},{"id":"374113","messageId":"05d4ad62d6559f3b041884dfe89cd30d6fa268ba.1555593396.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.v2.git.gitgitgadget@gmail.com","subject":"[PATCH v2 6/8] check-docs: do not bother checking for legacy scripts' documentation","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-18T13:16:46Z","receivedAt":"2019-04-18T13:16:52Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn the recent years, there has been a big push to convert more and more\nof Git's commands that are implemented as scripts to built-ins written\nin pure, portable C, for robustness, speed and portability.\n\nOne strategy that served us well is to convert those scripts\nincrementally, starting by renaming the scripts to\n`git-legacy-<command>`, then introducing a built-in that does nothing\nelse at first than checking the config setting `<command>.useBuiltin`\n(which defaults to `false` at the outset) and handing off to the legacy\nscript if so asked.\n\nObviously, those `git-legacy-<command>` commands share the documentation\nwith the built-in `git-<command>`, and are not intended to be called\ndirectly anyway. So let's not try to ensure that they are documented\nseparately from their built-in versions.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Makefile | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex 6f90cec590..f5fc977ee8 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -3074,7 +3074,7 @@ check-docs::\n \t\tgit-merge-octopus | git-merge-ours | git-merge-recursive | \\\n \t\tgit-merge-resolve | git-merge-subtree | \\\n \t\tgit-fsck-objects | git-init-db | \\\n-\t\tgit-remote-* | git-stage | \\\n+\t\tgit-remote-* | git-stage | git-legacy-* | \\\n \t\tgit-?*--?* ) continue ;; \\\n \t\tesac ; \\\n \t\ttest -f \"Documentation/$$v.txt\" || \\\n-- \ngitgitgadget\n\n"},{"id":"374115","messageId":"cf73021574a25f8f4f90dfa8a2b2ca827ef51723.1555593396.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.v2.git.gitgitgadget@gmail.com","subject":"[PATCH v2 7/8] test-tool: handle the `-C <directory>` option just like `git`","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-18T13:16:49Z","receivedAt":"2019-04-18T13:16:54Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn preparation for moving `git serve` into `test-tool` (because it\nreally is only used by the test suite), we teach the `test-tool` the\nuseful trick to change the working directory before running the test\ncommand, which will avoid introducing subshells in the test code.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/helper/test-tool.c | 19 +++++++++++++++++++\n 1 file changed, 19 insertions(+)\n\ndiff --git a/t/helper/test-tool.c b/t/helper/test-tool.c\nindex 99db7409b8..2b21943f93 100644\n--- a/t/helper/test-tool.c\n+++ b/t/helper/test-tool.c\n@@ -1,5 +1,11 @@\n #include \"git-compat-util.h\"\n #include \"test-tool.h\"\n+#include \"parse-options.h\"\n+\n+static const char * const test_tool_usage[] = {\n+\t\"test-tool [-C <directory>] <command [<arguments>...]]\",\n+\tNULL\n+};\n \n struct test_cmd {\n \tconst char *name;\n@@ -73,11 +79,24 @@ static NORETURN void die_usage(void)\n int cmd_main(int argc, const char **argv)\n {\n \tint i;\n+\tconst char *working_directory = NULL;\n+\tstruct option options[] = {\n+\t\tOPT_STRING('C', NULL, &working_directory, \"directory\",\n+\t\t\t   \"change the working directory\"),\n+\t\tOPT_END()\n+\t};\n \n \tBUG_exit_code = 99;\n+\targc = parse_options(argc, argv, NULL, options, test_tool_usage,\n+\t\t\t     PARSE_OPT_STOP_AT_NON_OPTION |\n+\t\t\t     PARSE_OPT_KEEP_ARGV0);\n+\n \tif (argc < 2)\n \t\tdie_usage();\n \n+\tif (working_directory && chdir(working_directory) < 0)\n+\t\tdie(\"Could not cd to '%s'\", working_directory);\n+\n \tfor (i = 0; i < ARRAY_SIZE(cmds); i++) {\n \t\tif (!strcmp(cmds[i].name, argv[1])) {\n \t\t\targv++;\n-- \ngitgitgadget\n\n"},{"id":"374116","messageId":"88a5ab23324d8dab58803b291ff6d7a03dc7a74e.1555593396.git.gitgitgadget@gmail.com","threadId":"50926","inReplyTo":"pull.168.v2.git.gitgitgadget@gmail.com","subject":"[PATCH v2 8/8] Turn `git serve` into a test helper","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-04-18T13:16:51Z","receivedAt":"2019-04-18T13:16:58Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe `git serve` built-in was introduced in ed10cb952d31 (serve:\nintroduce git-serve, 2018-03-15) as a backend to serve Git protocol v2,\nprobably originally intended to be spawned by `git upload-pack`.\n\nHowever, in the version that the protocol v2 patches made it into core\nGit, `git upload-pack` calls the `serve()` function directly instead of\nspawning `git serve`; The only reason in life for `git serve` to survive\nas a built-in command is to provide a way to test the protocol v2\nfunctionality.\n\nMeaning that it does not even have to be a built-in that is installed\nwith end-user facing Git installations, but it can be a test helper\ninstead.\n\nLet's make it so.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Makefile                                    |  2 +-\n builtin.h                                   |  1 -\n git.c                                       |  1 -\n builtin/serve.c => t/helper/test-serve-v2.c |  7 +++--\n t/helper/test-tool.c                        |  1 +\n t/helper/test-tool.h                        |  1 +\n t/t5701-git-serve.sh                        | 32 ++++++++++++---------\n t/t5702-protocol-v2.sh                      |  5 ++--\n t/t5703-upload-pack-ref-in-want.sh          | 16 +++++------\n 9 files changed, 36 insertions(+), 30 deletions(-)\n rename builtin/serve.c => t/helper/test-serve-v2.c (81%)\n\ndiff --git a/Makefile b/Makefile\nindex f5fc977ee8..9ce62fa295 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -758,6 +758,7 @@ TEST_BUILTINS_OBJS += test-repository.o\n TEST_BUILTINS_OBJS += test-revision-walking.o\n TEST_BUILTINS_OBJS += test-run-command.o\n TEST_BUILTINS_OBJS += test-scrap-cache-tree.o\n+TEST_BUILTINS_OBJS += test-serve-v2.o\n TEST_BUILTINS_OBJS += test-sha1.o\n TEST_BUILTINS_OBJS += test-sha1-array.o\n TEST_BUILTINS_OBJS += test-sha256.o\n@@ -1127,7 +1128,6 @@ BUILTIN_OBJS += builtin/rev-parse.o\n BUILTIN_OBJS += builtin/revert.o\n BUILTIN_OBJS += builtin/rm.o\n BUILTIN_OBJS += builtin/send-pack.o\n-BUILTIN_OBJS += builtin/serve.o\n BUILTIN_OBJS += builtin/shortlog.o\n BUILTIN_OBJS += builtin/show-branch.o\n BUILTIN_OBJS += builtin/show-index.o\ndiff --git a/builtin.h b/builtin.h\nindex 6538932e99..c48636e244 100644\n--- a/builtin.h\n+++ b/builtin.h\n@@ -219,7 +219,6 @@ extern int cmd_rev_parse(int argc, const char **argv, const char *prefix);\n extern int cmd_revert(int argc, const char **argv, const char *prefix);\n extern int cmd_rm(int argc, const char **argv, const char *prefix);\n extern int cmd_send_pack(int argc, const char **argv, const char *prefix);\n-extern int cmd_serve(int argc, const char **argv, const char *prefix);\n extern int cmd_shortlog(int argc, const char **argv, const char *prefix);\n extern int cmd_show(int argc, const char **argv, const char *prefix);\n extern int cmd_show_branch(int argc, const char **argv, const char *prefix);\ndiff --git a/git.c b/git.c\nindex 2dd588674f..c58b067771 100644\n--- a/git.c\n+++ b/git.c\n@@ -548,7 +548,6 @@ static struct cmd_struct commands[] = {\n \t{ \"revert\", cmd_revert, RUN_SETUP | NEED_WORK_TREE },\n \t{ \"rm\", cmd_rm, RUN_SETUP },\n \t{ \"send-pack\", cmd_send_pack, RUN_SETUP },\n-\t{ \"serve\", cmd_serve, RUN_SETUP },\n \t{ \"shortlog\", cmd_shortlog, RUN_SETUP_GENTLY | USE_PAGER },\n \t{ \"show\", cmd_show, RUN_SETUP },\n \t{ \"show-branch\", cmd_show_branch, RUN_SETUP },\ndiff --git a/builtin/serve.c b/t/helper/test-serve-v2.c\nsimilarity index 81%\nrename from builtin/serve.c\nrename to t/helper/test-serve-v2.c\nindex d3fd240bb3..aee35e5aef 100644\n--- a/builtin/serve.c\n+++ b/t/helper/test-serve-v2.c\n@@ -1,14 +1,14 @@\n+#include \"test-tool.h\"\n #include \"cache.h\"\n-#include \"builtin.h\"\n #include \"parse-options.h\"\n #include \"serve.h\"\n \n static char const * const serve_usage[] = {\n-\tN_(\"git serve [<options>]\"),\n+\tN_(\"test-tool serve-v2 [<options>]\"),\n \tNULL\n };\n \n-int cmd_serve(int argc, const char **argv, const char *prefix)\n+int cmd__serve_v2(int argc, const char **argv)\n {\n \tstruct serve_options opts = SERVE_OPTIONS_INIT;\n \n@@ -19,6 +19,7 @@ int cmd_serve(int argc, const char **argv, const char *prefix)\n \t\t\t N_(\"exit immediately after advertising capabilities\")),\n \t\tOPT_END()\n \t};\n+\tconst char *prefix = setup_git_directory();\n \n \t/* ignore all unknown cmdline switches for now */\n \targc = parse_options(argc, argv, prefix, options, serve_usage,\ndiff --git a/t/helper/test-tool.c b/t/helper/test-tool.c\nindex 2b21943f93..4bf3666b43 100644\n--- a/t/helper/test-tool.c\n+++ b/t/helper/test-tool.c\n@@ -48,6 +48,7 @@ static struct test_cmd cmds[] = {\n \t{ \"revision-walking\", cmd__revision_walking },\n \t{ \"run-command\", cmd__run_command },\n \t{ \"scrap-cache-tree\", cmd__scrap_cache_tree },\n+\t{ \"serve-v2\", cmd__serve_v2 },\n \t{ \"sha1\", cmd__sha1 },\n \t{ \"sha1-array\", cmd__sha1_array },\n \t{ \"sha256\", cmd__sha256 },\ndiff --git a/t/helper/test-tool.h b/t/helper/test-tool.h\nindex 25abed1cf2..bc72370916 100644\n--- a/t/helper/test-tool.h\n+++ b/t/helper/test-tool.h\n@@ -39,6 +39,7 @@ int cmd__repository(int argc, const char **argv);\n int cmd__revision_walking(int argc, const char **argv);\n int cmd__run_command(int argc, const char **argv);\n int cmd__scrap_cache_tree(int argc, const char **argv);\n+int cmd__serve_v2(int argc, const char **argv);\n int cmd__sha1(int argc, const char **argv);\n int cmd__sha1_array(int argc, const char **argv);\n int cmd__sha256(int argc, const char **argv);\ndiff --git a/t/t5701-git-serve.sh b/t/t5701-git-serve.sh\nindex fe45bf828d..ffb9613885 100755\n--- a/t/t5701-git-serve.sh\n+++ b/t/t5701-git-serve.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-test_description='test git-serve and server commands'\n+test_description='test protocol v2 server commands'\n \n . ./test-lib.sh\n \n@@ -14,7 +14,8 @@ test_expect_success 'test capability advertisement' '\n \t0000\n \tEOF\n \n-\tGIT_TEST_SIDEBAND_ALL=0 git serve --advertise-capabilities >out &&\n+\tGIT_TEST_SIDEBAND_ALL=0 test-tool serve-v2 \\\n+\t\t--advertise-capabilities >out &&\n \ttest-tool pkt-line unpack <out >actual &&\n \ttest_cmp expect actual\n '\n@@ -24,11 +25,11 @@ test_expect_success 'stateless-rpc flag does not list capabilities' '\n \ttest-tool pkt-line pack >in <<-EOF &&\n \t0000\n \tEOF\n-\tgit serve --stateless-rpc >out <in &&\n+\ttest-tool serve-v2 --stateless-rpc >out <in &&\n \ttest_must_be_empty out &&\n \n \t# EOF\n-\tgit serve --stateless-rpc >out &&\n+\ttest-tool serve-v2 --stateless-rpc >out &&\n \ttest_must_be_empty out\n '\n \n@@ -37,7 +38,7 @@ test_expect_success 'request invalid capability' '\n \tfoobar\n \t0000\n \tEOF\n-\ttest_must_fail git serve --stateless-rpc 2>err <in &&\n+\ttest_must_fail test-tool serve-v2 --stateless-rpc 2>err <in &&\n \ttest_i18ngrep \"unknown capability\" err\n '\n \n@@ -46,7 +47,7 @@ test_expect_success 'request with no command' '\n \tagent=git/test\n \t0000\n \tEOF\n-\ttest_must_fail git serve --stateless-rpc 2>err <in &&\n+\ttest_must_fail test-tool serve-v2 --stateless-rpc 2>err <in &&\n \ttest_i18ngrep \"no command requested\" err\n '\n \n@@ -56,7 +57,7 @@ test_expect_success 'request invalid command' '\n \tagent=git/test\n \t0000\n \tEOF\n-\ttest_must_fail git serve --stateless-rpc 2>err <in &&\n+\ttest_must_fail test-tool serve-v2 --stateless-rpc 2>err <in &&\n \ttest_i18ngrep \"invalid command\" err\n '\n \n@@ -87,7 +88,7 @@ test_expect_success 'basics of ls-refs' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc <in >out &&\n+\ttest-tool serve-v2 --stateless-rpc <in >out &&\n \ttest-tool pkt-line unpack <out >actual &&\n \ttest_cmp expect actual\n '\n@@ -107,7 +108,7 @@ test_expect_success 'basic ref-prefixes' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc <in >out &&\n+\ttest-tool serve-v2 --stateless-rpc <in >out &&\n \ttest-tool pkt-line unpack <out >actual &&\n \ttest_cmp expect actual\n '\n@@ -127,7 +128,7 @@ test_expect_success 'refs/heads prefix' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc <in >out &&\n+\ttest-tool serve-v2 --stateless-rpc <in >out &&\n \ttest-tool pkt-line unpack <out >actual &&\n \ttest_cmp expect actual\n '\n@@ -148,7 +149,7 @@ test_expect_success 'peel parameter' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc <in >out &&\n+\ttest-tool serve-v2 --stateless-rpc <in >out &&\n \ttest-tool pkt-line unpack <out >actual &&\n \ttest_cmp expect actual\n '\n@@ -169,7 +170,7 @@ test_expect_success 'symrefs parameter' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc <in >out &&\n+\ttest-tool serve-v2 --stateless-rpc <in >out &&\n \ttest-tool pkt-line unpack <out >actual &&\n \ttest_cmp expect actual\n '\n@@ -189,7 +190,7 @@ test_expect_success 'sending server-options' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc <in >out &&\n+\ttest-tool serve-v2 --stateless-rpc <in >out &&\n \ttest-tool pkt-line unpack <out >actual &&\n \ttest_cmp expect actual\n '\n@@ -204,7 +205,10 @@ test_expect_success 'unexpected lines are not allowed in fetch request' '\n \t0000\n \tEOF\n \n-\ttest_must_fail git -C server serve --stateless-rpc <in >/dev/null 2>err &&\n+\t(\n+\t\tcd server &&\n+\t\ttest_must_fail test-tool serve-v2 --stateless-rpc\n+\t) <in >/dev/null 2>err &&\n \tgrep \"unexpected line: .this-is-not-a-command.\" err\n '\n \ndiff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh\nindex db4ae09f2f..8691bfc52d 100755\n--- a/t/t5702-protocol-v2.sh\n+++ b/t/t5702-protocol-v2.sh\n@@ -359,12 +359,13 @@ test_expect_success 'even with handcrafted request, filter does not work if not\n \t0000\n \tEOF\n \n-\ttest_must_fail git -C server serve --stateless-rpc <in >/dev/null 2>err &&\n+\ttest_must_fail test-tool -C server serve-v2 --stateless-rpc \\\n+\t\t<in >/dev/null 2>err &&\n \tgrep \"unexpected line: .filter blob:none.\" err &&\n \n \t# Exercise to ensure that if advertised, filter works\n \tgit -C server config uploadpack.allowfilter 1 &&\n-\tgit -C server serve --stateless-rpc <in >/dev/null\n+\ttest-tool -C server serve-v2 --stateless-rpc <in >/dev/null\n '\n \n test_expect_success 'default refspec is used to filter ref when fetchcing' '\ndiff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\nindex f87b2f6df3..dd1cbd0dd6 100755\n--- a/t/t5703-upload-pack-ref-in-want.sh\n+++ b/t/t5703-upload-pack-ref-in-want.sh\n@@ -48,15 +48,15 @@ test_expect_success 'setup repository' '\n '\n \n test_expect_success 'config controls ref-in-want advertisement' '\n-\tgit serve --advertise-capabilities >out &&\n+\ttest-tool serve-v2 --advertise-capabilities >out &&\n \t! grep -a ref-in-want out &&\n \n \tgit config uploadpack.allowRefInWant false &&\n-\tgit serve --advertise-capabilities >out &&\n+\ttest-tool serve-v2 --advertise-capabilities >out &&\n \t! grep -a ref-in-want out &&\n \n \tgit config uploadpack.allowRefInWant true &&\n-\tgit serve --advertise-capabilities >out &&\n+\ttest-tool serve-v2 --advertise-capabilities >out &&\n \tgrep -a ref-in-want out\n '\n \n@@ -70,7 +70,7 @@ test_expect_success 'invalid want-ref line' '\n \t0000\n \tEOF\n \n-\ttest_must_fail git serve --stateless-rpc 2>out <in &&\n+\ttest_must_fail test-tool serve-v2 --stateless-rpc 2>out <in &&\n \tgrep \"unknown ref\" out\n '\n \n@@ -90,7 +90,7 @@ test_expect_success 'basic want-ref' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc >out <in &&\n+\ttest-tool serve-v2 --stateless-rpc >out <in &&\n \tcheck_output\n '\n \n@@ -112,7 +112,7 @@ test_expect_success 'multiple want-ref lines' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc >out <in &&\n+\ttest-tool serve-v2 --stateless-rpc >out <in &&\n \tcheck_output\n '\n \n@@ -133,7 +133,7 @@ test_expect_success 'mix want and want-ref' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc >out <in &&\n+\ttest-tool serve-v2 --stateless-rpc >out <in &&\n \tcheck_output\n '\n \n@@ -153,7 +153,7 @@ test_expect_success 'want-ref with ref we already have commit for' '\n \t0000\n \tEOF\n \n-\tgit serve --stateless-rpc >out <in &&\n+\ttest-tool serve-v2 --stateless-rpc >out <in &&\n \tcheck_output\n '\n \n-- \ngitgitgadget\n"},{"id":"374118","messageId":"20190418160115.GA8054@sigill.intra.peff.net","threadId":"50926","inReplyTo":"nycvar.QRO.7.76.6.1904181505520.46@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 4/7] docs: exclude documentation for commands that have been excluded","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-04-18T16:01:16Z","receivedAt":"2019-04-18T16:01:19Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Apr 18, 2019 at 03:06:56PM +0200, Johannes Schindelin wrote:\n\n> > What about command-line options that influence the outcome? It sounds\n> > like this is the same problem we have in lots of other places (like say,\n> > compiler flags being updated), that we solve by generating the proposed\n> > file output unconditionally and comparing it to what's on disk.  E.g.,\n> > see the way GIT-CFLAGS or GIT-BUILD-OPTIONS is generated.\n> \n> *Sigh*\n> \n> I really did not want to do that because I thought it would be tedious and\n> more complicated and result in a longer patch.\n> \n> Well, don't you know. The patch is actually *a lot* shorter now. So much\n> so that range-diff thinks it is a different commit ;-)\n\n:) Great. I looked at the result in your v2 and it looks good to me.\n\n-Peff\n"},{"id":"374165","messageId":"xmqqef5yefkg.fsf@gitster-ct.c.googlers.com","threadId":"50926","inReplyTo":"f8d133c59725938afa85f6be349c2bba05fe98e7.1555593396.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 5/8] docs: exclude documentation for commands that have been excluded","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-19T05:20:47Z","receivedAt":"2019-04-19T20:44:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> When building with certain build options, some commands are excluded\n> from the build. For example, `git-credential-cache` is skipped when\n> building with `NO_UNIX_SOCKETS`.\n>\n> Let's not build or package documentation for those excluded commands.\n>\n> This issue was pointed out rightfully when running `make check-docs` on\n> Windows, where we do not yet have Unix sockets, and therefore the\n> `credential-cache` command is excluded (yet its documentation was built\n> and shipped).\n>\n> Note: building the documentation via `make -C Documentation` leaves the\n> build system with no way to determine which commands have been\n> excluded. If called thusly, we gracefully fail to exclude their\n> documentation. Only when building the documentation via the top-level\n> Makefile will it get excluded properly, or after building\n> `Documentation/GIT-EXCLUDED-PROGRAMS` manually.\n\nI certainly know where you come from, but I am on the fence.  Being\nable to omit documentation, without thinking, for what you do not\nship is surely handy, but at the same time, being able to format\neverything you have the necessary material for is also valuable.\n\n"},{"id":"374637","messageId":"nycvar.QRO.7.76.6.1904290828090.45@tvgsbejvaqbjf.bet","threadId":"50926","inReplyTo":"xmqqef5yefkg.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH v2 5/8] docs: exclude documentation for commands that have been excluded","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-04-29T12:28:31Z","receivedAt":"2019-04-29T12:28:44Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Fri, 19 Apr 2019, Junio C Hamano wrote:\n\n> \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\n> writes:\n>\n> > From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> >\n> > When building with certain build options, some commands are excluded\n> > from the build. For example, `git-credential-cache` is skipped when\n> > building with `NO_UNIX_SOCKETS`.\n> >\n> > Let's not build or package documentation for those excluded commands.\n> >\n> > This issue was pointed out rightfully when running `make check-docs` on\n> > Windows, where we do not yet have Unix sockets, and therefore the\n> > `credential-cache` command is excluded (yet its documentation was built\n> > and shipped).\n> >\n> > Note: building the documentation via `make -C Documentation` leaves the\n> > build system with no way to determine which commands have been\n> > excluded. If called thusly, we gracefully fail to exclude their\n> > documentation. Only when building the documentation via the top-level\n> > Makefile will it get excluded properly, or after building\n> > `Documentation/GIT-EXCLUDED-PROGRAMS` manually.\n>\n> I certainly know where you come from, but I am on the fence.  Being\n> able to omit documentation, without thinking, for what you do not\n> ship is surely handy, but at the same time, being able to format\n> everything you have the necessary material for is also valuable.\n\nI guess you need a maintainer's mode ;-)\n\nCiao,\nDscho\n"}]}