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

[PATCH 1/3] doc-diff: fix non-portable 'man' invocation

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Aug 31, 2018, 06:33 UTC
Message-ID
<20180831063318.33373-2-sunshine@sunshineco.com>
In-Reply-To
<20180831063318.33373-1-sunshine@sunshineco.com>

doc-diff invokes 'man' with the -l option to force "local" mode, however, neither MacOS nor FreeBSD recognize this option. On those platforms, if the argument to 'man' contains a slash, it is automatically interpreted as a file specification, so a "local"-like mode is not needed. And, it turns out, 'man' which does support -l falls back to enabling -l automatically if it can't otherwise find a manual entry corresponding to the argument. Since doc-diff always passes an absolute path of the nroff source file to 'man', the -l option kicks in anyhow, despite not being specified explicitly. Therefore, make the invocation portable to the various platforms by simply dropping -l.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 Documentation/doc-diff | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/doc-diff b/Documentation/doc-diff
index f483fe427c..c2906eac5e 100755
--- a/Documentation/doc-diff
+++ b/Documentation/doc-diff
@@ -69,7 +69,7 @@ generate_render_makefile () {
 		printf '%s: %s\n' "$dst" "$src"
 		printf '\t@echo >&2 "  RENDER $(notdir $@)" && \\\n'
 		printf '\tmkdir -p $(dir $@) && \\\n'
-		printf '\tMANWIDTH=80 man -l $< >$@+ && \\\n'
+		printf '\tMANWIDTH=80 man $< >$@+ && \\\n'
 		printf '\tmv $@+ $@\n'
 	done
 }
-- 
2.19.0.rc1.352.gb1634b371d
Previous: Eric SunshineNext: Jeff King
Message 8 of 25 in “doc-diff: always use oids inside worktree”
  1. doc-diff: always use oids inside worktreeJeff King, Aug 30, 2018
  2. Eric SunshineAug 30, 2018
  3. doc/Makefile: remove tmp-doc-diff on "make clean"Jeff King, Aug 30, 2018
  4. Eric SunshineAug 30, 2018
  5. Eric SunshineAug 30, 2018
  6. Jeff KingAug 30, 2018
  7. 0/3 doc-diff: add "clean" mode & fix portability problemEric Sunshine, Aug 31, 2018
  8. 1/3 doc-diff: fix non-portable 'man' invocationEric Sunshine, Aug 31, 2018
  9. Jeff KingAug 31, 2018
  10. 3/3 doc/Makefile: drop doc-diff worktree and temporary files on "make clean"Eric Sunshine, Aug 31, 2018
  11. Jeff KingAug 31, 2018
  12. Eric SunshineAug 31, 2018
  13. Jonathan NiederSep 17, 2018
  14. Junio C HamanoSep 17, 2018
  15. Jonathan NiederSep 17, 2018
  16. Junio C HamanoSep 17, 2018
  17. Jonathan NiederSep 17, 2018
  18. Jeff KingSep 18, 2018
  19. Eric SunshineSep 17, 2018
  20. Eric SunshineSep 17, 2018
  21. 2/3 doc-diff: add --clean mode to remove temporary working gunkEric Sunshine, Aug 31, 2018
  22. Jeff KingAug 31, 2018
  23. Eric SunshineAug 31, 2018
  24. Junio C HamanoAug 31, 2018
  25. Jeff KingAug 31, 2018

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.