git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/3] meson: don't install git-pack-redundant(1) docs with breaking changes

From
Patrick Steinhardt <ps@pks.im>
Date
Mar 12, 2025, 13:17 UTC
Message-ID
<20250312-b4-pks-meson-breaking-changes-v1-3-b89e9a59d228@pks.im>
In-Reply-To
<20250312-b4-pks-meson-breaking-changes-v1-0-b89e9a59d228@pks.im>

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>
---
 Documentation/Makefile    |  2 +-
 Documentation/meson.build | 13 +++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 671267a8ac7..e6b20c021fd 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -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; \
diff --git a/Documentation/meson.build b/Documentation/meson.build
index 594546d68b1..a2de85f5aad 100644
--- a/Documentation/meson.build
+++ b/Documentation/meson.build
@@ -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,
-- 
2.49.0.rc2.394.gf6994c5077.dirty
Previous: Patrick SteinhardtNext: Karthik Nayak
Message 4 of 11 in “meson: improve handling of `-Dbreaking_changes=true`”
  1. 0/3 meson: improve handling of `-Dbreaking_changes=true`Patrick Steinhardt, Mar 12, 2025
  2. 1/3 meson: define WITH_BREAKING_CHANGES when enabling breaking changesPatrick Steinhardt, Mar 12, 2025
  3. 2/3 meson: don't compile git-pack-redundant(1) with breaking changesPatrick Steinhardt, Mar 12, 2025
  4. 3/3 meson: don't install git-pack-redundant(1) docs with breaking changesPatrick Steinhardt, Mar 12, 2025
  5. Karthik NayakMar 13, 2025
  6. Phillip WoodMar 16, 2025
  7. Patrick SteinhardtMar 17, 2025
  8. Phillip WoodMar 17, 2025
  9. Phillip WoodMar 18, 2025
  10. Patrick SteinhardtMar 19, 2025
  11. Karthik NayakMar 13, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.