doc: check-docs and WITH_BREAKING_CHANGES
RFC 1/1 doc: check-docs and WITH_BREAKING_CHANGES
Shouldn't we do something like this for breaking builds?
Documentation/Makefile pays attention to EXCLUDED_PROGRAMS to pretend that the git-$deprecated.adoc files do not exist
-include GIT-EXCLUDED-PROGRAMS
MAN1_TXT += $(filter-out \
$(patsubst %,%.adoc,$(EXCLUDED_PROGRAMS)) \
$(addsuffix .adoc, $(ARTICLES) $(SP_ARTICLES)), \
$(wildcard git-*.adoc))but nobody seems to put the removed programs on the list.
The dependencies around Documentation/GIT-EXCLUDED-PROGRAMS is still screwed up, I think, but this may be a good first step to straighten it out. If "make -C Documentation" runs lint-docs by default, for example, we may want to tweak the Makefile down there to make link-docs target depend on the GIT-EXCLUDED-PROGRAMS perhaps.
Makefile +5 -1
@@ -892,6 +892,8 @@ BUILT_INS += git-switch$X BUILT_INS += git-version$X ifndef WITH_BREAKING_CHANGES BUILT_INS += git-whatchanged$X +else +EXCLUDED_PROGRAMS += git-whatchanged endif # what 'all' will build but not install in gitexecdir
@@ -1363,6 +1365,8 @@ BUILTIN_OBJS += builtin/notes.o BUILTIN_OBJS += builtin/pack-objects.o ifndef WITH_BREAKING_CHANGES BUILTIN_OBJS += builtin/pack-redundant.o +else +EXCLUDED_PROGRAMS += git-pack-redundant endif BUILTIN_OBJS += builtin/pack-refs.o BUILTIN_OBJS += builtin/patch-id.o
@@ -3875,7 +3879,7 @@ ALL_COMMANDS += gitweb ALL_COMMANDS += scalar .PHONY: check-docs -check-docs:: +check-docs:: Documentation/GIT-EXCLUDED-PROGRAMS $(MAKE) -C Documentation lint-docs ### Make sure built-ins do not have dups and listed in git.c
Makefile
Quoted 24 lines · Junio C Hamano
Shouldn't we do something like this for breaking builds?
Documentation/Makefilepays attention toEXCLUDED_PROGRAMSto pretend that the git-$deprecated.adoc files do not exist-include GIT-EXCLUDED-PROGRAMS MAN1_TXT += $(filter-out \ $(patsubst %,%.adoc,$(EXCLUDED_PROGRAMS)) \ $(addsuffix .adoc, $(ARTICLES) $(SP_ARTICLES)), \ $(wildcard git-*.adoc))but nobody seems to put the removed programs on the list.
The dependencies around
Documentation/GIT-EXCLUDED-PROGRAMSis still screwed up, I think, but this may be a good first step to straighten it out. If "make -C Documentation" runs lint-docs by default, for example, we may want to tweak theMakefiledown there to make link-docs target depend on the GIT-EXCLUDED-PROGRAMS perhaps.Makefile +0
-0
Curious, but what's up with the "i" and "w" prefixes here? :)
Makefile BUILT_INS += git-switch$X · line 899
Quoted 9 lines
Makefile +2
-0@@ -892,6 +892,8 @@ BUILT_INS += git-switch$X BUILT_INS += git-version$X ifndef WITH_BREAKING_CHANGES BUILT_INS += git-whatchanged$X +else +EXCLUDED_PROGRAMS += git-whatchanged endif # what 'all' will build but not install in gitexecdir
I think this change makes sense indeed. It means that we stop linting the docs, which is a bit of a weird side effect that may or may not be sensible. But in any case, we should probably stop installing these man pages.
I say "probably" because this got me thinking: we could keep the man page for a while, but completely replace their its with a notice saying that the command got removed. Even better, we could even tell users what the replacement is.
Patrick
Quoted 24 lines · Patrick Steinhardt
Quoted 20 lines · Junio C Hamano
Shouldn't we do something like this for breaking builds?
Documentation/Makefilepays attention toEXCLUDED_PROGRAMSto pretend that the git-$deprecated.adoc files do not exist-include GIT-EXCLUDED-PROGRAMS MAN1_TXT += $(filter-out \ $(patsubst %,%.adoc,$(EXCLUDED_PROGRAMS)) \ $(addsuffix .adoc, $(ARTICLES) $(SP_ARTICLES)), \ $(wildcard git-*.adoc))but nobody seems to put the removed programs on the list.
The dependencies around
Documentation/GIT-EXCLUDED-PROGRAMSis still screwed up, I think, but this may be a good first step to straighten it out. If "make -C Documentation" runs lint-docs by default, for example, we may want to tweak theMakefiledown there to make link-docs target depend on the GIT-EXCLUDED-PROGRAMS perhaps.
Quoted 6 lines
Makefile
Quoted 4 lines
Makefile +0
-0Curious, but what's up with the "i" and "w" prefixes here? :)
That’s « index » and « working tree » from diff.mnemonicPrefix
Quoted 24 lines · Ben Knoble
Quoted 24 lines · Patrick Steinhardt
Quoted 20 lines · Junio C Hamano
Shouldn't we do something like this for breaking builds?
Documentation/Makefilepays attention toEXCLUDED_PROGRAMSto pretend that the git-$deprecated.adoc files do not exist-include GIT-EXCLUDED-PROGRAMS MAN1_TXT += $(filter-out \ $(patsubst %,%.adoc,$(EXCLUDED_PROGRAMS)) \ $(addsuffix .adoc, $(ARTICLES) $(SP_ARTICLES)), \ $(wildcard git-*.adoc))but nobody seems to put the removed programs on the list.
The dependencies around
Documentation/GIT-EXCLUDED-PROGRAMSis still screwed up, I think, but this may be a good first step to straighten it out. If "make -C Documentation" runs lint-docs by default, for example, we may want to tweak theMakefiledown there to make link-docs target depend on the GIT-EXCLUDED-PROGRAMS perhaps.
Quoted 8 lines
Quoted 6 lines
Makefile
Quoted 4 lines
Makefile +0
-0Curious, but what's up with the "i" and "w" prefixes here? :)
That’s « index » and « working tree » from diff.mnemonicPrefix
Interesting. It's amazing how there's always something new to learn about Git :) Thanks!
Patrick
Quoted 6 lines · Patrick Steinhardt
Makefile
Quoted 4 lines
Makefile +0
-0Curious, but what's up with the "i" and "w" prefixes here? :)
They indicate that you are looking at uncommitted "here is what I typed in the working tree for illustration" changes ;-).
Quoted 9 lines
I think this change makes sense indeed. It means that we stop linting the docs, which is a bit of a weird side effect that may or may not be sensible. But in any case, we should probably stop installing these man pages.
I say "probably" because this got me thinking: we could keep the man page for a while, but completely replace their its with a notice saying that the command got removed. Even better, we could even tell users what the replacement is.
That is true but requires a much larger change.
There is an assumption that programs whose binaries we are not installing should not get manual pages, which is what allows us to throw git-http-fetch and git-whatchanged to EXCLUDED_PROGRAMS and cause (1) them from getting built and installed, and (2) cause their manual pages not built and not installed, and (3) tell doc-lint that it is OK to have .adoc for these programs' documentation, even though they are not listed in the command-list.txt file. You'd need to start from disentangling that.
Thanks.
Quoted 13 lines · Junio C Hamano
Quoted 9 lines · Patrick Steinhardt
I think this change makes sense indeed. It means that we stop linting the docs, which is a bit of a weird side effect that may or may not be sensible. But in any case, we should probably stop installing these man pages.
I say "probably" because this got me thinking: we could keep the man page for a while, but completely replace their its with a notice saying that the command got removed. Even better, we could even tell users what the replacement is.
That is true but requires a much larger change.
Quoted 8 lines
There is an assumption that programs whose binaries we are not installing should not get manual pages, which is what allows us to throw git-http-fetch and git-whatchanged to
EXCLUDED_PROGRAMSand cause (1) them from getting built and installed, and (2) cause their manual pages not built and not installed, and (3) tell doc-lint that it is OK to have .adoc for these programs' documentation, even though they are not listed in the command-list.txt file. You'd need to start from disentangling that.
Fair. I'm completely fine with doing this one step at a time, where the first step would be to not install manpages that don't make any sense anymore. Let's see, maybe someone wants to pick up what I propose.
Patrick