mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-06-26 20:17:52 +00:00
man: make output system independent
The current help output might change based on the number of CPU cores available (since it reflects the dynamic --jobs logic). This is good for users running repo locally, but not good for shipping static man pages. Hook the help output to have it generate the same output all the time. Change-Id: I3098ceddc0ad914b0b8e3b25d660b5a264cb41ee Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/312882 Reviewed-by: Roger Shimizu <rosh@debian.org> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
@ -47,6 +47,11 @@ def main(argv):
|
||||
if not shutil.which('help2man'):
|
||||
sys.exit('Please install help2man to continue.')
|
||||
|
||||
# Let repo know we're generating man pages so it can avoid some dynamic
|
||||
# behavior (like probing active number of CPUs). We use a weird name &
|
||||
# value to make it less likely for users to set this var themselves.
|
||||
os.environ['_REPO_GENERATE_MANPAGES_'] = ' indeed! '
|
||||
|
||||
# "repo branch" is an alias for "repo branches".
|
||||
del subcmds.all_commands['branch']
|
||||
(MANDIR / 'repo-branch.1').write_text('.so man1/repo-branches.1')
|
||||
|
Reference in New Issue
Block a user