man: disable line wrapping

When help2man runs the repo script to generate man pages, the argparse
module relies on the COLUMNS environment variable to wrap help text.
This wrapping can cause URLs and descriptions to be awkwardly broken
across lines. Setting COLUMNS="10000" prevents argparse from wrapping
the output, keeping URLs intact in the generated man pages.

Additionally, this fixes a broken git documentation URL fragment for
--partial-clone in the repo script.

Bug: 295374161
Change-Id: I0c79f37fbfe2bebe71ff90585f2e5e1f88ea33cb
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/601482
Tested-by: Brian Gan <brgan@google.com>
Commit-Queue: Brian Gan <brgan@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
This commit is contained in:
Brian Gan
2026-06-25 20:48:34 +00:00
committed by gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com
parent 3af9e2f146
commit 6586efe79a
23 changed files with 96 additions and 175 deletions
+1
View File
@@ -76,6 +76,7 @@ def main(argv: List[str]) -> int:
# 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! "
os.environ["COLUMNS"] = "10000"
# "repo branch" is an alias for "repo branches".
del subcmds.all_commands["branch"]