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

Re: [PATCH] doc: manpage: remove maximum title length

From
Jeff King <peff@peff.net>
Date
May 3, 2023, 16:43 UTC
Message-ID
<20230503164354.GC1789686@coredump.intra.peff.net>
In-Reply-To
<20230503052926.217219-1-felipe.contreras@gmail.com>
On Tue, May 02, 2023 at 11:29:26PM -0600, Felipe Contreras wrote:
Show 6 quoted lines
> DocBook Stylesheets limit the size of the manpage titles for some
> reason.
> 
> Even some of the longest git commands have no trouble fitting in 80
> character terminals, so it's not clear why we would want to limit titles
> to 20 characters, especially when modern terminals are much bigger.
Makes sense.

Since the manpage header shows the name twice, along with "Git Manual", the practical limit for an 80-column terminal is somewhere around 35 characters. If it's not hard to do, it might be worth setting the value there, but I agree that we're unlikely to exceed that anyway, so it's probably not a big deal either way.

I could also see an argument that the truncation is worse than any wrapping or other ugliness that the user might see on a smaller terminal, which implies that "no limit" as you have here is the best option.

Show 16 quoted lines
> For example:
> 
> --- a/git-credential-cache--daemon.1
> +++ b/git-credential-cache--daemon.1
> @@ -1,4 +1,4 @@
> -GIT-CREDENTIAL-CAC(1)             Git Manual             GIT-CREDENTIAL-CAC(1)
> +GIT-CREDENTIAL-CACHE--DAEMON(1)   Git Manual   GIT-CREDENTIAL-CACHE--DAEMON(1)
> 
>  NAME
>         git-credential-cache--daemon - Temporarily store user credentials in
> @@ -24,4 +24,4 @@ DESCRIPTION
>  GIT
>         Part of the git(1) suite
> 
> -Git omitted                       2023-05-02             GIT-CREDENTIAL-CAC(1)
> +Git omitted                       2023-05-02   GIT-CREDENTIAL-CACHE--DAEMON(1)

Your patch can't be applied by "git am" because of this diff in the commit message (it thinks the commit message stops at the first diff, even if it is before a "---" marker). The usual practice is to indent the included diff.

-Peff
Previous: Felipe ContrerasNext: Felipe Contreras
Message 2 of 8 in “doc: manpage: remove maximum title length”
  1. doc: manpage: remove maximum title lengthFelipe Contreras, May 3, 2023
  2. Jeff KingMay 3, 2023
  3. Felipe ContrerasMay 3, 2023
  4. doc: manpage: remove maximum title lengthFelipe Contreras, May 3, 2023
  5. Junio C HamanoMay 3, 2023
  6. Junio C HamanoMay 3, 2023
  7. Junio C HamanoMay 3, 2023
  8. Felipe ContrerasMay 8, 2023

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.