From: "Jean-Noël Avila via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Patrick Steinhardt" <ps@pks.im>, "Jean-Noël Avila" <jn.avila@free.fr>
Subject: [PATCH v2 0/5] Doc git commit
Date: Wed, 15 Jan 2025 20:23:43 +0000 [thread overview]
Message-ID: <pull.1845.v2.git.1736972628.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1845.git.1735912046.gitgitgadget@gmail.com>
This series continues the effort of rewriting the documentation with
uniformization and better formatting of the man pages. This time, git-commit
is processed, taking advantage of previous experiences.
Jean-Noël Avila (5):
doc: apply new documentation guidelines to git commit
doc: the mode param of -u of git commit is optional
doc: make more direct explanations in git commit options
doc: convert git commit config to new format
doc: migrate git-commit manpage secondary files to new format
Documentation/config/commit.txt | 25 +--
Documentation/git-commit.txt | 281 +++++++++++++++----------------
Documentation/i18n.txt | 4 +-
Documentation/signoff-option.txt | 8 +-
builtin/commit.c | 2 +-
5 files changed, 161 insertions(+), 159 deletions(-)
base-commit: 1b4e9a5f8b5f048972c21fe8acafe0404096f694
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1845%2Fjnavila%2Fdoc_git-commit-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1845/jnavila/doc_git-commit-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1845
Range-diff vs v1:
1: dfd907fc314 ! 1: 91cff84b5f8 doc: git-commit: apply new documentation guidelines
@@ Metadata
Author: Jean-Noël Avila <jn.avila@free.fr>
## Commit message ##
- doc: git-commit: apply new documentation guidelines
+ doc: apply new documentation guidelines to git commit
- The documentation for git-commit has been updated to follow the new
- documentation guidelines. The following changes have been applied to
- the series of patches:
-
- - switching the synopsis to a synopsis block which will automatically
+ - 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.
- Additionally, some option descriptions have been turned into
- imperative mood to make them more consistent with the rest of the
- documentation.
-
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
## Documentation/git-commit.txt ##
@@ Documentation/git-commit.txt: git-commit - Record changes to the repository
-[verse]
-'git commit' [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]
+[synopsis]
-+git commit [-a | --interactive | --patch] [-s] [-v] [-u[<mode>]] [--amend]
++git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]
[--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>]
[-F <file> | -m <msg>] [--reset-author] [--allow-empty]
[--allow-empty-message] [--no-verify] [-e] [--author=<author>]
@@ Documentation/git-commit.txt: summary of what is included by any of the above fo
-------
--a::
---all::
-- Tell the command to automatically stage files that have
+`-a`::
+`--all`::
-+ Automatically stage files that have
+ Tell the command to automatically stage files that have
been modified and deleted, but new files you have not
told Git about are not affected.
@@ Documentation/git-commit.txt: summary of what is included by any of the above fo
--F <file>::
---file=<file>::
-- Take the commit message from the given file. Use '-' to
+`-F <file>`::
+`--file=<file>`::
-+ Take the commit message from _<file>_. Use `-` to
+ Take the commit message from the given file. Use '-' to
read the message from the standard input.
---author=<author>::
@@ Documentation/git-commit.txt: summary of what is included by any of the above fo
--m <msg>::
---message=<msg>::
-- Use the given <msg> as the commit message.
+`-m <msg>`::
+`--message=<msg>`::
-+ Use _<msg>_ as the commit message.
+ Use the given <msg> as the commit message.
If multiple `-m` options are given, their values are
concatenated as separate paragraphs.
+
@@ Documentation/git-commit.txt: summary of what is included by any of the above fo
+`-t <file>`::
+`--template=<file>`::
When editing the commit message, start the editor with the
-- contents in the given file. The `commit.template` configuration
-+ contents in _<file>_. The `commit.template` configuration
+ contents in the given file. The `commit.template` configuration
variable is often used to give this option implicitly to the
- command. This mechanism can be used by projects that want to
- guide participants with some hints on what to write in the message
@@ Documentation/git-commit.txt: The `-m` option is mutually exclusive with `-c`, `-C`, and `-F`.
include::signoff-option.txt[]
@@ Documentation/git-commit.txt: The `-m` option is mutually exclusive with `-c`, `
--n::
---[no-]verify::
-- By default, the pre-commit and commit-msg hooks are run.
-- When any of `--no-verify` or `-n` is given, these are bypassed.
+`-n`::
+`--[no-]verify`::
-+ Bypass the `pre-commit` and `commit-msg` hooks.
+ By default, the pre-commit and commit-msg hooks are run.
+ When any of `--no-verify` or `-n` is given, these are bypassed.
See also linkgit:githooks[5].
---allow-empty::
@@ Documentation/git-commit.txt: The `-m` option is mutually exclusive with `-c`, `
linkgit:git-commit-tree[1].
---cleanup=<mode>::
-- This option determines how the supplied commit message should be
+`--cleanup=<mode>`::
-+ Determine how the supplied commit message should be
+ This option determines how the supplied commit message should be
cleaned up before committing. The '<mode>' can be `strip`,
`whitespace`, `verbatim`, `scissors` or `default`.
+
@@ Documentation/git-commit.txt: default::
--e::
---edit::
-- The message taken from file with `-F`, command line with
-- `-m`, and from commit object with `-C` are usually used as
-- the commit log message unmodified. This option lets you
-- further edit the message taken from these sources.
+`-e`::
+`--edit`::
-+ Let the user further edit the message taken from file
-+ with `-F`, command line with `-m`, and from commit object
-+ with `-C` are usually used as the commit log message unmodified.
+ The message taken from file with `-F`, command line with
+ `-m`, and from commit object with `-C` are usually used as
+ the commit log message unmodified. This option lets you
+ further edit the message taken from these sources.
---no-edit::
+`--no-edit`::
@@ Documentation/git-commit.txt: include::i18n.txt[]
`VISUAL` environment variable, or the `EDITOR` environment variable (in that
order). See linkgit:git-var[1] for details.
-
- ## builtin/commit.c ##
-@@
- #include "trailer.h"
-
- static const char * const builtin_commit_usage[] = {
-- N_("git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]\n"
-+ N_("git commit [-a | --interactive | --patch] [-s] [-v] [-u[<mode>]] [--amend]\n"
- " [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>]\n"
- " [-F <file> | -m <msg>] [--reset-author] [--allow-empty]\n"
- " [--allow-empty-message] [--no-verify] [-e] [--author=<author>]\n"
-: ----------- > 2: d58526a9b39 doc: the mode param of -u of git commit is optional
-: ----------- > 3: 39db87ff906 doc: make more direct explanations in git commit options
2: 9f518ec8f9d ! 4: 9216554bd70 doc: git-commit.txt: convert git commit config to new format
@@ Metadata
Author: Jean-Noël Avila <jn.avila@free.fr>
## Commit message ##
- doc: git-commit.txt: convert git commit config to new format
+ doc: convert git commit config to new format
Also prevent git-commit manpage to refer to itself in the config
description by using a variable.
3: 9f8d4e74b7b ! 5: 28316a709da doc: git-commit: migrate secondary files to new format
@@ Metadata
Author: Jean-Noël Avila <jn.avila@free.fr>
## Commit message ##
- doc: git-commit: migrate secondary files to new format
+ doc: migrate git-commit manpage secondary files to new format
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
--
gitgitgadget
next prev parent reply other threads:[~2025-01-15 20:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-03 13:47 [PATCH 0/3] Doc git commit Jean-Noël Avila via GitGitGadget
2025-01-03 13:47 ` [PATCH 1/3] doc: git-commit: apply new documentation guidelines Jean-Noël Avila via GitGitGadget
2025-01-06 7:38 ` Patrick Steinhardt
2025-01-07 21:14 ` Jean-Noël AVILA
2025-01-03 13:47 ` [PATCH 2/3] doc: git-commit.txt: convert git commit config to new format Jean-Noël Avila via GitGitGadget
2025-01-03 13:47 ` [PATCH 3/3] doc: git-commit: migrate secondary files " Jean-Noël Avila via GitGitGadget
2025-01-15 20:23 ` Jean-Noël Avila via GitGitGadget [this message]
2025-01-15 20:23 ` [PATCH v2 1/5] doc: apply new documentation guidelines to git commit Jean-Noël Avila via GitGitGadget
2025-01-15 23:46 ` Junio C Hamano
2025-01-15 20:23 ` [PATCH v2 2/5] doc: the mode param of -u of git commit is optional Jean-Noël Avila via GitGitGadget
2025-01-15 20:23 ` [PATCH v2 3/5] doc: make more direct explanations in git commit options Jean-Noël Avila via GitGitGadget
2025-01-15 20:23 ` [PATCH v2 4/5] doc: convert git commit config to new format Jean-Noël Avila via GitGitGadget
2025-01-15 23:49 ` Junio C Hamano
2025-01-15 20:23 ` [PATCH v2 5/5] doc: migrate git-commit manpage secondary files " Jean-Noël Avila via GitGitGadget
2025-01-16 10:17 ` Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.1845.v2.git.1736972628.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=jn.avila@free.fr \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).