Skip to content

doc: convert git log man page to new synopsis format #1933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

jnavila
Copy link

@jnavila jnavila commented Jun 7, 2025

This series converts the man page of git log to the synopsis format style. Git log is the second largest manpage after git config, which makes the changes quite large.

A special note about the log format description which required escaping the synopsis processing of parentheses.

jnavila added 6 commits June 7, 2025 17:07
- Switch the synopsis to a synopsis block which will automatically
  format placeholders in italics and keywords in monospace
- Use _<placeholder>_ instead of <placeholder> in the description
- Use `backticks` for keywords and more complex option
descriptions. The new rendering engine will apply synopsis rules to
these spans.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Use `backticks` for commit ranges. The new rendering engine will apply
synopsis rules to these spans.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
  format placeholders in italics and keywords in monospace
- Use _<placeholder>_ instead of <placeholder> in the description
- Use `backticks` for keywords and more complex option
descriptions. The new rendering engine will apply synopsis rules to
these spans.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
- Use _<placeholder>_ instead of <placeholder> in the description
- Use `backticks` for keywords and more complex option
descriptions. The new rendering engine will apply synopsis rules to
these spans.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
- Fix some malformed synopis of options
- Use _<placeholder>_ instead of <placeholder> in the description
- Use `backticks` for keywords and more complex option
descriptions. The new rendering engine will apply synopsis rules to
these spans.
- Add the '%' sign to the characters of keywords.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
- Use _<placeholder>_ instead of <placeholder> in the description
- Use `backticks` for keywords and more complex option
descriptions. The new rendering engine will apply synopsis rules to
these spans.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Copy link

gitgitgadget bot commented Jun 7, 2025

There are issues in commit c06e18a:
doc: git-log: convert pretty formats to new doc format
Lines in the body of the commit messages should be wrapped between 60 and 76 characters.
Indented lines, and lines without whitespace, are exempt

jnavila added 3 commits June 8, 2025 10:01
- Use _<placeholder>_ instead of <placeholder> in the description
- Use `backticks` for keywords and more complex option
descriptions. The new rendering engine will apply synopsis rules to
these spans.

For all the formats in the form of %(foo), the formatting needs to be
heavier because we not want the parentheses to be rendered as syntax
elements,but as keywords, i.e. we need to circumvent the syntax highlighting
of synopsis.  In this particular case, this requires the heavy escaping of
the parts that contain parentheses with ++.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
- Use `backticks` for keywords and more complex option
descriptions. The new rendering engine will apply synopsis rules to
these spans.
- In description lists, put each option on its own line, to make them more
searchable and enable automatic translation of the options.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
- Use `backticks` for keywords and more complex option
descriptions. The new rendering engine will apply synopsis rules to
these spans.
- Explain possible options in description list instead of in a paragraph.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
@jnavila
Copy link
Author

jnavila commented Jun 8, 2025

/submit

Copy link

gitgitgadget bot commented Jun 8, 2025

Submitted as pull.1933.git.1749373787.gitgitgadget@gmail.com

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git/ pr-1933/jnavila/doc_git_log-v1

To fetch this version to local tag pr-1933/jnavila/doc_git_log-v1:

git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-1933/jnavila/doc_git_log-v1

@jnavila
Copy link
Author

jnavila commented Jun 8, 2025

/preview

Copy link

gitgitgadget bot commented Jun 8, 2025

Preview email sent as pull.1933.v2.git.1749374531.gitgitgadget@gmail.com

@jnavila jnavila changed the title Doc git log doc: convert git log man page to new synopsis format Jun 8, 2025
Copy link

gitgitgadget bot commented Jun 8, 2025

This patch series was integrated into seen via git@3caf8f8.

@gitgitgadget gitgitgadget bot added the seen label Jun 8, 2025
Copy link

gitgitgadget bot commented Jun 9, 2025

This patch series was integrated into seen via git@603c449.

Copy link

gitgitgadget bot commented Jun 10, 2025

This patch series was integrated into seen via git@48deb1f.

Copy link

gitgitgadget bot commented Jun 10, 2025

This patch series was integrated into seen via git@7dc835f.

Copy link

gitgitgadget bot commented Jun 11, 2025

This patch series was integrated into seen via git@8ec5fe7.

Copy link

gitgitgadget bot commented Jun 12, 2025

This patch series was integrated into seen via git@a6ff8bc.

Copy link

gitgitgadget bot commented Jun 12, 2025

This patch series was integrated into seen via git@c632d58.

Copy link

gitgitgadget bot commented Jun 13, 2025

This patch series was integrated into seen via git@e6dbbaa.

Copy link

gitgitgadget bot commented Jun 16, 2025

This patch series was integrated into seen via git@0c1ffc9.

@@ -8,8 +8,8 @@ git-log - Show commit logs

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Junio C Hamano wrote (reply to this):

"Jean-Noël Avila via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
>
> - Switch the synopsis to a synopsis block which will automatically
>   format placeholders in italics and keywords in monospace
> - Use _<placeholder>_ instead of <placeholder> in the description
> - Use `backticks` for keywords and more complex option
> descriptions. The new rendering engine will apply synopsis rules to
> these spans.
>
> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
> ---
>  Documentation/git-log.adoc | 83 ++++++++++++++++++++------------------
>  1 file changed, 44 insertions(+), 39 deletions(-)

This hunk (lightly edited to shift contexts) ...

> ---no-decorate::
> ---decorate[=short|full|auto|no]::
> -	Print out the ref names of any commits that are shown. If 'short' is
> -	specified, the ref name prefixes 'refs/heads/', 'refs/tags/' and
> -	'refs/remotes/' will not be printed. If 'full' is specified, the
> -	full ref name (including prefix) will be printed. If 'auto' is
> -	specified, then if the output is going to a terminal, the ref names
> -	are shown as if 'short' were given, otherwise no ref names are
> -	shown. The option `--decorate` is short-hand for `--decorate=short`.
> -	Default to configuration value of `log.decorate` if configured,
> -	otherwise, `auto`.
> +`--no-decorate`::
> +`--decorate[=(short|full|auto|no)]`::
> +	Print out the ref names of any commits that are shown. Possible values
> +	are:
> ++
> +----
> +`short`;; the ref name prefixes `refs/heads/`, `refs/tags/` and
> +	`refs/remotes/` are not printed.
> +`full`;; the full ref name (including prefix) is printed.
> +`auto`:: if the output is going to a terminal, the ref names
> +	are shown as if `short` were given, otherwise no ref names are
> +	shown.
> +----
> ++
> +The option `--decorate` is short-hand for `--decorate=short`. Default to
> +configuration value of `log.decorate` if configured, otherwise, `auto`.

... does more than what the three-bullet list in the proposed log
message describes.  The result is certainly easier to follow and
more extensible to have these possible values in an enumerated list
than in a prose.

> +`--decorate-refs=<pattern>`::
> +`--decorate-refs-exclude=<pattern>`::
>  	For each candidate reference, do not use it for decoration if it
> -	matches any patterns given to `--decorate-refs-exclude` or if it
> -	doesn't match any of the patterns given to `--decorate-refs`. The
> +	matches any of _<pattern>_ given to `--decorate-refs-exclude` or if it
> +	doesn't match any of _<pattern>_ given to `--decorate-refs`. The

"any patterns" in the original may not be grammatical, but the
rewritten "any of _<pattern>_" does not sound grammatical, either.
"any of the _<pattern>_s"?  I dunno what the convention should be
when more than one <placeholder> instances have to be referenced.

Copy link

gitgitgadget bot commented Jun 17, 2025

This patch series was integrated into seen via git@5aa46aa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant