Skip to content

Commit bbd831c

Browse files
pks-tgitster
authored andcommitted
meson: don't install git-pack-redundant(1) docs with breaking changes
When breaking changes are enabled we continue to install documentation of the git-pack-redundant(1) command even though it is completely disabled and thus inaccessible. Improve this by only installing the documentation in case breaking changes aren't enabled. Based-on-patch-by: Karthik Nayak <[email protected]> Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 24a3f30 commit bbd831c

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

Documentation/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ lint-docs-meson:
509509
awk "/^manpages = {$$/ {flag=1 ; next } /^}$$/ { flag=0 } flag { gsub(/^ \047/, \"\"); gsub(/\047 : [157],\$$/, \"\"); print }" meson.build | \
510510
grep -v -e '#' -e '^$$' | \
511511
sort >tmp-meson-diff/meson.adoc && \
512-
ls git*.adoc scalar.adoc | grep -v -e git-bisect-lk2009.adoc -e git-tools.adoc >tmp-meson-diff/actual.adoc && \
512+
ls git*.adoc scalar.adoc | grep -v -e git-bisect-lk2009.adoc -e git-pack-redundant.adoc -e git-tools.adoc >tmp-meson-diff/actual.adoc && \
513513
if ! cmp tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; then \
514514
echo "Meson man pages differ from actual man pages:"; \
515515
diff -u tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; \

Documentation/meson.build

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ manpages = {
9696
'git-notes.adoc' : 1,
9797
'git-p4.adoc' : 1,
9898
'git-pack-objects.adoc' : 1,
99-
'git-pack-redundant.adoc' : 1,
10099
'git-pack-refs.adoc' : 1,
101100
'git-patch-id.adoc' : 1,
102101
'git-prune-packed.adoc' : 1,
@@ -205,6 +204,14 @@ manpages = {
205204
'gitworkflows.adoc' : 7,
206205
}
207206

207+
manpages_breaking_changes = {
208+
'git-pack-redundant.adoc' : 1,
209+
}
210+
211+
if not get_option('breaking_changes')
212+
manpages += manpages_breaking_changes
213+
endif
214+
208215
docs_backend = get_option('docs_backend')
209216
if docs_backend == 'auto'
210217
if find_program('asciidoc', dirs: program_path, required: false).found()
@@ -479,7 +486,9 @@ endif
479486
# Sanity check that we are not missing any tests present in 't/'. This check
480487
# only runs once at configure time and is thus best-effort, only. Furthermore,
481488
# it only verifies man pages for the sake of simplicity.
482-
configured_manpages = manpages.keys() + [ 'git-bisect-lk2009.adoc', 'git-tools.adoc' ]
489+
configured_manpages = manpages.keys()
490+
configured_manpages += manpages_breaking_changes.keys()
491+
configured_manpages += [ 'git-bisect-lk2009.adoc', 'git-tools.adoc' ]
483492
actual_manpages = run_command(shell, '-c', 'ls git*.adoc scalar.adoc',
484493
check: true,
485494
env: script_environment,

0 commit comments

Comments
 (0)