]> git.ipfire.org Git - thirdparty/git.git/commitdiff
meson: don't install git-pack-redundant(1) docs with breaking changes
authorPatrick Steinhardt <ps@pks.im>
Wed, 12 Mar 2025 13:17:34 +0000 (14:17 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Mar 2025 16:20:21 +0000 (09:20 -0700)
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 <karthik.188@gmail.com>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/Makefile
Documentation/meson.build

index 671267a8ac7af6c298af716b4be1a0b4900be396..e6b20c021fdd56edf77e50c88e6dc413fa1d5090 100644 (file)
@@ -509,7 +509,7 @@ lint-docs-meson:
        awk "/^manpages = {$$/ {flag=1 ; next } /^}$$/ { flag=0 } flag { gsub(/^  \047/, \"\"); gsub(/\047 : [157],\$$/, \"\"); print }" meson.build | \
                grep -v -e '#' -e '^$$' | \
                sort >tmp-meson-diff/meson.adoc && \
-       ls git*.adoc scalar.adoc | grep -v -e git-bisect-lk2009.adoc -e git-tools.adoc >tmp-meson-diff/actual.adoc && \
+       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 && \
        if ! cmp tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; then \
                echo "Meson man pages differ from actual man pages:"; \
                diff -u tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; \
index 594546d68b12c1a72efd6e1cdf84ad9006ad5eba..a2de85f5aad95f299ba8b12f68cc6e64bd745ba0 100644 (file)
@@ -96,7 +96,6 @@ manpages = {
   'git-notes.adoc' : 1,
   'git-p4.adoc' : 1,
   'git-pack-objects.adoc' : 1,
-  'git-pack-redundant.adoc' : 1,
   'git-pack-refs.adoc' : 1,
   'git-patch-id.adoc' : 1,
   'git-prune-packed.adoc' : 1,
@@ -205,6 +204,14 @@ manpages = {
   'gitworkflows.adoc' : 7,
 }
 
+manpages_breaking_changes = {
+  'git-pack-redundant.adoc' : 1,
+}
+
+if not get_option('breaking_changes')
+  manpages += manpages_breaking_changes
+endif
+
 docs_backend = get_option('docs_backend')
 if docs_backend == 'auto'
   if find_program('asciidoc', dirs: program_path, required: false).found()
@@ -479,7 +486,9 @@ endif
 # Sanity check that we are not missing any tests present in 't/'. This check
 # only runs once at configure time and is thus best-effort, only. Furthermore,
 # it only verifies man pages for the sake of simplicity.
-configured_manpages = manpages.keys() + [ 'git-bisect-lk2009.adoc', 'git-tools.adoc' ]
+configured_manpages = manpages.keys()
+configured_manpages += manpages_breaking_changes.keys()
+configured_manpages += [ 'git-bisect-lk2009.adoc', 'git-tools.adoc' ]
 actual_manpages = run_command(shell, '-c', 'ls git*.adoc scalar.adoc',
   check: true,
   env: script_environment,