From patchwork Wed Jan 15 20:23:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 13940891 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF7BF191F75 for ; Wed, 15 Jan 2025 20:23:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736972636; cv=none; b=tuA9Rpm2t76phv0rshn4UcOXLooGb23X95J62UNXKeHM3H2dclc1ZaL7UVciChC6eltmDHbmNJ2Vn+IWQniIARNxcrOMCQnvMGx22upVWJaBZmLxGcdVQpv3BBYCzAENw8NYKDgynZIdIDGfAG+p3VJcHbpZu0iBhqVoXPgXOlk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736972636; c=relaxed/simple; bh=KetzzMsMQkwPydl8wV0y88e4XAz9H0vs84b+GW+hduw=; h=Message-Id:In-Reply-To:References:From:Date:Subject:MIME-Version: Content-Type:To:Cc; b=LJk//CmhSjxrbgYr9RB70kZCnaFPmbyVwHHXl9/JurYPj+a0/uZatRMo75w5hSRmRKfcW19rNjN3eJec39HdHQU4DJVAEl5fKusL/BhlZOCPAqB9nl72xCqDonl7t4mNcnMGRiXX1DMxuJvmMSza9zyG2yzRMXIWenNJ11LeIk0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZFN0BsHd; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZFN0BsHd" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-436281c8a38so665115e9.3 for ; Wed, 15 Jan 2025 12:23:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736972632; x=1737577432; darn=vger.kernel.org; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=g3eRVXfdcNpjKzopdTiFWqE40H9mPT89rzuQgy13ET8=; b=ZFN0BsHdk41kR/UE8HVvf/XpiRzGFnuA4gokwpkI0qwQY76f8ZsTkWDL4FnfP/BloY mq6eyzqVMd+3XKNTbHMpDNFZMRAW532oASc1MmwolpdOkzwZicSP0zkOUGrpZCRaVApB aftNvUNimOIsM8E4DHlpc429hxbpWGAwor6YszR5kSWE39YU8zohztfF+M9eQ4nrmjwg ELsy61GdTrfgA5MBxLH3TcvUrCobFuRbgqab7o2PRWPEgnIDq7NYUwaZJibyJx1ITo8b CWFRnaP3EvImVi9lOwRJZsRtq+QLrmXKJjIBFpMcgQpgDg3ackImCpoPqoOCNvQtxrxn EEmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736972632; x=1737577432; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g3eRVXfdcNpjKzopdTiFWqE40H9mPT89rzuQgy13ET8=; b=EVtSeePUUbsnE8tKK7A236XntxagkPmrOhdKD1gScigii+wLcrn0cJN81Sf+dqZb4b WavV5tLe6SR63YdJq782hVbiNRuOth2F0DnTf3BxxDuYMjC/hyZNxyqqoLaklqjmnLRB piMZbEsuwUqhoSeCnuqI4d6Ps/656ueFRFCzM9eftjECI65SjIbjQfyaLyce/FEd2Ggd NIYa/7lLR3fFbrr4n8v8jSDx/r2qN+l/9efKPCoQguo6B1hvPRfhfbuPfmplraSIN9/V GXenIL8uGTnNQYsuMJdSyoIsLpswuAyv7A3AatKmHPYVwVuPItxP7yB6CjHLbFLFIAVU uInQ== X-Gm-Message-State: AOJu0YzW8QRtzQ9ELN2ecOJVmoAS7BOfGnGZJPKOxzS4Sn0clccOhew0 2IX4qAg4CLKEu0+qfxf+LPllWNqAq8Se+Fo9jUBWoTmn2YWUn+65FWVvCg== X-Gm-Gg: ASbGncvN9/OXgo0pIQ9Hln+UnCIkolWF8auv+xHHRaDGmGxPgH9EqpgIIkiWcSeRA/s ZPyIzlbplags8lhqZXUszervkDwCRT9aL7H8Wy47KtRqDj+GjQp5bbkIqD6SPdSQt4wDYjy2sza qiGK8CLcXYXih48xrDrk0uXAFk92X/hX/ypiDebLsecc664XZ/CD5QPw/docAuZzIpVpx8Pj2jg vjPdSzud3uLuabfHGZWDFSUK6Rw/Mrf3DulKTWJTlDZW6EP6s7Hk7fWcw== X-Google-Smtp-Source: AGHT+IFzfqZAaHsNI4VVHLMTFsKl2+ksgPXCIzBF0W2sZspBRywtrKunEFXeP8Pl+Gx5nJM+D5ThZw== X-Received: by 2002:a05:600c:1caa:b0:434:fdf3:2c26 with SMTP id 5b1f17b1804b1-436e26c3b5emr248335215e9.19.1736972631227; Wed, 15 Jan 2025 12:23:51 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c74c6179sm34652315e9.22.2025.01.15.12.23.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2025 12:23:50 -0800 (PST) Message-Id: <91cff84b5f8d9e1140e94dd96d259224ea905611.1736972628.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Wed, 15 Jan 2025 20:23:44 +0000 Subject: [PATCH v2 1/5] doc: apply new documentation guidelines to git commit Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Patrick Steinhardt , =?utf-8?q?Jean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No?= =?utf-8?q?=C3=ABl_Avila?= From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= - switch the synopsis to a synopsis block which will automatically format placeholders in italics and keywords in monospace - use __ instead of 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 --- Documentation/git-commit.txt | 256 +++++++++++++++++------------------ 1 file changed, 128 insertions(+), 128 deletions(-) diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index c822113c111..e37c4a4987e 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -7,8 +7,8 @@ git-commit - Record changes to the repository SYNOPSIS -------- -[verse] -'git commit' [-a | --interactive | --patch] [-s] [-v] [-u] [--amend] +[synopsis] +git commit [-a | --interactive | --patch] [-s] [-v] [-u] [--amend] [--dry-run] [(-c | -C | --squash) | --fixup [(amend|reword):]] [-F | -m ] [--reset-author] [--allow-empty] [--allow-empty-message] [--no-verify] [-e] [--author=] @@ -23,31 +23,31 @@ Create a new commit containing the current contents of the index and the given log message describing the changes. The new commit is a direct child of HEAD, usually the tip of the current branch, and the branch is updated to point to it (unless no branch is associated with -the working tree, in which case HEAD is "detached" as described in +the working tree, in which case `HEAD` is "detached" as described in linkgit:git-checkout[1]). The content to be committed can be specified in several ways: 1. by using linkgit:git-add[1] to incrementally "add" changes to the - index before using the 'commit' command (Note: even modified files + index before using the `commit` command (Note: even modified files must be "added"); 2. by using linkgit:git-rm[1] to remove files from the working tree - and the index, again before using the 'commit' command; + and the index, again before using the `commit` command; -3. by listing files as arguments to the 'commit' command - (without --interactive or --patch switch), in which +3. by listing files as arguments to the `commit` command + (without `--interactive` or `--patch` switch), in which case the commit will ignore changes staged in the index, and instead record the current content of the listed files (which must already be known to Git); -4. by using the -a switch with the 'commit' command to automatically +4. by using the `-a` switch with the `commit` command to automatically "add" changes from all known files (i.e. all files that are already listed in the index) and to automatically "rm" files in the index that have been removed from the working tree, and then perform the actual commit; -5. by using the --interactive or --patch switches with the 'commit' command +5. by using the `--interactive` or `--patch` switches with the `commit` command to decide one by one which files or hunks should be part of the commit in addition to contents in the index, before finalizing the operation. See the ``Interactive Mode'' section of @@ -58,137 +58,137 @@ summary of what is included by any of the above for the next commit by giving the same set of parameters (options and paths). If you make a commit and then find a mistake immediately after -that, you can recover from it with 'git reset'. +that, you can recover from it with `git reset`. :git-commit: 1 OPTIONS ------- --a:: ---all:: +`-a`:: +`--all`:: 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. --p:: ---patch:: +`-p`:: +`--patch`:: Use the interactive patch selection interface to choose which changes to commit. See linkgit:git-add[1] for details. --C :: ---reuse-message=:: - Take an existing commit object, and reuse the log message +`-C `:: +`--reuse-message=`:: + Take an existing __ object, and reuse the log message and the authorship information (including the timestamp) when creating the commit. --c :: ---reedit-message=:: - Like '-C', but with `-c` the editor is invoked, so that +`-c `:: +`--reedit-message=`:: + Like `-C`, but with `-c` the editor is invoked, so that the user can further edit the commit message. ---fixup=[(amend|reword):]:: - Create a new commit which "fixes up" `` when applied with +`--fixup=[(amend|reword):]`:: + Create a new commit which "fixes up" __ when applied with `git rebase --autosquash`. Plain `--fixup=` creates a - "fixup!" commit which changes the content of `` but leaves + "fixup!" commit which changes the content of __ but leaves its log message untouched. `--fixup=amend:` is similar but creates an "amend!" commit which also replaces the log message of - `` with the log message of the "amend!" commit. + __ with the log message of the "amend!" commit. `--fixup=reword:` creates an "amend!" commit which - replaces the log message of `` with its own log message - but makes no changes to the content of ``. + replaces the log message of __ with its own log message + but makes no changes to the content of __. + The commit created by plain `--fixup=` has a subject -composed of "fixup!" followed by the subject line from , +composed of "fixup!" followed by the subject line from __, and is recognized specially by `git rebase --autosquash`. The `-m` option may be used to supplement the log message of the created commit, but the additional commentary will be thrown away once the -"fixup!" commit is squashed into `` by +"fixup!" commit is squashed into __ by `git rebase --autosquash`. + The commit created by `--fixup=amend:` is similar but its subject is instead prefixed with "amend!". The log message of - is copied into the log message of the "amend!" commit and +__ is copied into the log message of the "amend!" commit and opened in an editor so it can be refined. When `git rebase ---autosquash` squashes the "amend!" commit into ``, the -log message of `` is replaced by the refined log message +--autosquash` squashes the "amend!" commit into __, the +log message of __ is replaced by the refined log message from the "amend!" commit. It is an error for the "amend!" commit's log message to be empty unless `--allow-empty-message` is specified. + `--fixup=reword:` is shorthand for `--fixup=amend: ---only`. It creates an "amend!" commit with only a log message + --only`. It creates an "amend!" commit with only a log message (ignoring any changes staged in the index). When squashed by `git -rebase --autosquash`, it replaces the log message of `` +rebase --autosquash`, it replaces the log message of __ without making any other changes. + Neither "fixup!" nor "amend!" commits change authorship of -`` when applied by `git rebase --autosquash`. +__ when applied by `git rebase --autosquash`. See linkgit:git-rebase[1] for details. ---squash=:: - Construct a commit message for use with `rebase --autosquash`. +`--squash=`:: + Construct a commit message for use with `git rebase --autosquash`. The commit message subject line is taken from the specified commit with a prefix of "squash! ". Can be used with additional commit message options (`-m`/`-c`/`-C`/`-F`). See linkgit:git-rebase[1] for details. ---reset-author:: - When used with -C/-c/--amend options, or when committing after a +`--reset-author`:: + When used with `-C`/`-c`/`--amend` options, or when committing after a conflicting cherry-pick, declare that the authorship of the resulting commit now belongs to the committer. This also renews the author timestamp. ---short:: +`--short`:: When doing a dry-run, give the output in the short-format. See linkgit:git-status[1] for details. Implies `--dry-run`. ---branch:: +`--branch`:: Show the branch and tracking info even in short-format. ---porcelain:: +`--porcelain`:: When doing a dry-run, give the output in a porcelain-ready format. See linkgit:git-status[1] for details. Implies `--dry-run`. ---long:: +`--long`:: When doing a dry-run, give the output in the long-format. Implies `--dry-run`. --z:: ---null:: +`-z`:: +`--null`:: When showing `short` or `porcelain` status output, print the - filename verbatim and terminate the entries with NUL, instead of LF. + filename verbatim and terminate the entries with _NUL_, instead of _LF_. If no format is given, implies the `--porcelain` output format. Without the `-z` option, filenames with "unusual" characters are quoted as explained for the configuration variable `core.quotePath` (see linkgit:git-config[1]). --F :: ---file=:: +`-F `:: +`--file=`:: Take the commit message from the given file. Use '-' to read the message from the standard input. ---author=:: +`--author=`:: Override the commit author. Specify an explicit author using the - standard `A U Thor ` format. Otherwise + standard `A U Thor ` format. Otherwise __ is assumed to be a pattern and is used to search for an existing - commit by that author (i.e. rev-list --all -i --author=); + commit by that author (i.e. `git rev-list --all -i --author=`); the commit author is then copied from the first such commit found. ---date=:: +`--date=`:: Override the author date used in the commit. --m :: ---message=:: +`-m `:: +`--message=`:: Use the given as the commit message. If multiple `-m` options are given, their values are concatenated as separate paragraphs. + The `-m` option is mutually exclusive with `-c`, `-C`, and `-F`. --t :: ---template=:: +`-t `:: +`--template=`:: When editing the commit message, start the editor with the contents in the given file. The `commit.template` configuration variable is often used to give this option implicitly to the @@ -200,56 +200,56 @@ The `-m` option is mutually exclusive with `-c`, `-C`, and `-F`. include::signoff-option.txt[] ---trailer [(=|:)]:: - Specify a (, ) pair that should be applied as a +`--trailer [(=|:)]`:: + Specify a (__, __) pair that should be applied as a trailer. (e.g. `git commit --trailer "Signed-off-by:C O Mitter \ " --trailer "Helped-by:C O Mitter \ - "` will add the "Signed-off-by" trailer - and the "Helped-by" trailer to the commit message.) + "` will add the `Signed-off-by` trailer + and the `Helped-by` trailer to the commit message.) The `trailer.*` configuration variables (linkgit:git-interpret-trailers[1]) can be used to define if a duplicated trailer is omitted, where in the run of trailers each trailer would appear, and other details. --n:: ---[no-]verify:: +`-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. See also linkgit:githooks[5]. ---allow-empty:: +`--allow-empty`:: Usually recording a commit that has the exact same tree as its sole parent commit is a mistake, and the command prevents you from making such a commit. This option bypasses the safety, and is primarily for use by foreign SCM interface scripts. ---allow-empty-message:: - Like --allow-empty this command is primarily for use by foreign +`--allow-empty-message`:: + Like `--allow-empty` this command is primarily for use by foreign SCM interface scripts. It allows you to create a commit with an empty commit message without using plumbing commands like linkgit:git-commit-tree[1]. ---cleanup=:: +`--cleanup=`:: This option determines how the supplied commit message should be cleaned up before committing. The '' can be `strip`, `whitespace`, `verbatim`, `scissors` or `default`. + -- -strip:: +`strip`:: Strip leading and trailing empty lines, trailing whitespace, commentary and collapse consecutive empty lines. -whitespace:: +`whitespace`:: Same as `strip` except #commentary is not removed. -verbatim:: +`verbatim`:: Do not change the message at all. -scissors:: +`scissors`:: Same as `whitespace` except that everything from (and including) the line found below is truncated, if the message is to be edited. - "`#`" can be customized with core.commentChar. + "`#`" can be customized with `core.commentChar`. # ------------------------ >8 ------------------------ -default:: +`default`:: Same as `strip` if the message is to be edited. Otherwise `whitespace`. -- @@ -257,19 +257,19 @@ default:: The default can be changed by the `commit.cleanup` configuration variable (see linkgit:git-config[1]). --e:: ---edit:: +`-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. ---no-edit:: +`--no-edit`:: Use the selected commit message without launching an editor. For example, `git commit --amend --no-edit` amends a commit without changing its commit message. ---amend:: +`--amend`:: Replace the tip of the current branch by creating a new commit. The recorded tree is prepared as usual (including the effect of the `-i` and `-o` options and explicit @@ -295,23 +295,23 @@ You should understand the implications of rewriting history if you amend a commit that has already been published. (See the "RECOVERING FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].) ---no-post-rewrite:: - Bypass the post-rewrite hook. +`--no-post-rewrite`:: + Bypass the `post-rewrite` hook. --i:: ---include:: +`-i`:: +`--include`:: Before making a commit out of staged contents so far, stage the contents of paths given on the command line as well. This is usually not what you want unless you are concluding a conflicted merge. --o:: ---only:: +`-o`:: +`--only`:: Make a commit by taking the updated working tree contents of the paths specified on the command line, disregarding any contents that have been staged for other paths. This is the default mode of operation of - 'git commit' if any paths are given on the command line, + `git commit` if any paths are given on the command line, in which case this option can be omitted. If this option is specified together with `--amend`, then no paths need to be specified, which can be used to amend @@ -319,48 +319,48 @@ FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].) already been staged. If used together with `--allow-empty` paths are also not required, and an empty commit will be created. ---pathspec-from-file=:: - Pathspec is passed in `` instead of commandline args. If - `` is exactly `-` then standard input is used. Pathspec - elements are separated by LF or CR/LF. Pathspec elements can be +`--pathspec-from-file=`:: + Pathspec is passed in __ instead of commandline args. If + __ is exactly `-` then standard input is used. Pathspec + elements are separated by _LF_ or _CR_/_LF_. Pathspec elements can be quoted as explained for the configuration variable `core.quotePath` (see linkgit:git-config[1]). See also `--pathspec-file-nul` and global `--literal-pathspecs`. ---pathspec-file-nul:: +`--pathspec-file-nul`:: Only meaningful with `--pathspec-from-file`. Pathspec elements are - separated with NUL character and all other characters are taken + separated with _NUL_ character and all other characters are taken literally (including newlines and quotes). --u[]:: ---untracked-files[=]:: +`-u[]`:: +`--untracked-files[=]`:: Show untracked files. + -- -The mode parameter is optional (defaults to 'all'), and is used to -specify the handling of untracked files; when -u is not used, the -default is 'normal', i.e. show untracked files and directories. +The __ parameter is optional (defaults to `all`), and is used to +specify the handling of untracked files; when `-u` is not used, the +default is `normal`, i.e. show untracked files and directories. The possible options are: - - 'no' - Show no untracked files - - 'normal' - Shows untracked files and directories - - 'all' - Also shows individual files in untracked directories. +`no`:: Show no untracked files +`normal`:: Shows untracked files and directories +`all`:: Also shows individual files in untracked directories. All usual spellings for Boolean value `true` are taken as `normal` and `false` as `no`. -The default can be changed using the status.showUntrackedFiles +The default can be changed using the `status.showUntrackedFiles` configuration variable documented in linkgit:git-config[1]. -- --v:: ---verbose:: - Show unified diff between the HEAD commit and what +`-v`:: +`--verbose`:: + Show unified diff between the `HEAD` commit and what would be committed at the bottom of the commit message template to help the user describe the commit by reminding what changes the commit has. Note that this diff output doesn't have its - lines prefixed with '#'. This diff will not be a part + lines prefixed with `#`. This diff will not be a part of the commit message. See the `commit.verbose` configuration variable in linkgit:git-config[1]. + @@ -368,40 +368,40 @@ If specified twice, show in addition the unified diff between what would be committed and the worktree files, i.e. the unstaged changes to tracked files. --q:: ---quiet:: +`-q`:: +`--quiet`:: Suppress commit summary message. ---dry-run:: +`--dry-run`:: Do not create a commit, but show a list of paths that are to be committed, paths with local changes that will be left uncommitted and paths that are untracked. ---status:: +`--status`:: Include the output of linkgit:git-status[1] in the commit message template when using an editor to prepare the commit message. Defaults to on, but can be used to override - configuration variable commit.status. + configuration variable `commit.status`. ---no-status:: +`--no-status`:: Do not include the output of linkgit:git-status[1] in the commit message template when using an editor to prepare the default commit message. --S[]:: ---gpg-sign[=]:: ---no-gpg-sign:: - GPG-sign commits. The `keyid` argument is optional and +`-S[]`:: +`--gpg-sign[=]`:: +`--no-gpg-sign`:: + GPG-sign commits. The __ is optional and defaults to the committer identity; if specified, it must be stuck to the option without a space. `--no-gpg-sign` is useful to countermand both `commit.gpgSign` configuration variable, and earlier `--gpg-sign`. -\--:: +`--`:: Do not interpret any more arguments as options. -...:: - When pathspec is given on the command line, commit the contents of +`...`:: + When __ is given on the command line, commit the contents of the files that match the pathspec without recording the changes already added to the index. The contents of these files are also staged for the next commit on top of what have been staged before. @@ -412,10 +412,10 @@ EXAMPLES -------- When recording your own work, the contents of modified files in your working tree are temporarily stored to a staging area -called the "index" with 'git add'. A file can be +called the "index" with `git add`. A file can be reverted back, only in the index but not in the working tree, to that of the last commit with `git restore --staged `, -which effectively reverts 'git add' and prevents the changes to +which effectively reverts `git add` and prevents the changes to this file from participating in the next commit. After building the state to be committed incrementally with these commands, `git commit` (without any pathname parameter) is used to record what @@ -443,7 +443,7 @@ $ git commit -a ------------ The command `git commit -a` first looks at your working tree, -notices that you have modified hello.c and removed goodbye.c, +notices that you have modified `hello.c` and removed `goodbye.c`, and performs necessary `git add` and `git rm` for you. After staging changes to many files, you can alter the order the @@ -471,13 +471,13 @@ $ git commit this second commit would record the changes to `hello.c` and `hello.h` as expected. -After a merge (initiated by 'git merge' or 'git pull') stops +After a merge (initiated by `git merge` or `git pull`) stops because of conflicts, cleanly merged paths are already staged to be committed for you, and paths that conflicted are left in unmerged state. You would have to first -check which paths are conflicting with 'git status' +check which paths are conflicting with `git status` and after fixing them manually in your working tree, you would -stage the result as usual with 'git add': +stage the result as usual with `git add`: ------------ $ git status | grep unmerged @@ -507,12 +507,12 @@ COMMIT INFORMATION Author and committer information is taken from the following environment variables, if set: - GIT_AUTHOR_NAME - GIT_AUTHOR_EMAIL - GIT_AUTHOR_DATE - GIT_COMMITTER_NAME - GIT_COMMITTER_EMAIL - GIT_COMMITTER_DATE + * `GIT_AUTHOR_NAME` + * `GIT_AUTHOR_EMAIL` + * `GIT_AUTHOR_DATE` + * `GIT_COMMITTER_NAME` + * `GIT_COMMITTER_EMAIL` + * `GIT_COMMITTER_DATE` (nb "<", ">" and "\n"s are stripped) @@ -524,7 +524,7 @@ that, see the `credential.username` variable in linkgit:git-config[1]. In case (some of) these environment variables are not set, the information is taken from the configuration items `user.name` and `user.email`, or, if not -present, the environment variable EMAIL, or, if that is not set, +present, the environment variable `EMAIL`, or, if that is not set, system user name and the hostname used for outgoing mail (taken from `/etc/mailname` and falling back to the fully qualified hostname when that file does not exist). @@ -555,7 +555,7 @@ include::i18n.txt[] ENVIRONMENT AND CONFIGURATION VARIABLES --------------------------------------- The editor used to edit the commit log message will be chosen from the -`GIT_EDITOR` environment variable, the core.editor configuration variable, the +`GIT_EDITOR` environment variable, the `core.editor` configuration variable, the `VISUAL` environment variable, or the `EDITOR` environment variable (in that order). See linkgit:git-var[1] for details. From patchwork Wed Jan 15 20:23:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 13940890 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63DD61D61AA for ; Wed, 15 Jan 2025 20:23:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736972636; cv=none; b=OQBQQGlv3eWr4VUZPRxq1/NUh1hoqt77aL2et76P0MpLx6gIUxgf/s+OcjYPT6XqIiiwcWf3rHbff1aB6UDO+iuekYyxSm3p838EWoL06r/xusthnbDfZ8TIbMiskZUpCqeMDc+l+1RChCW6rvxe3Hw6aDaSxEJFmYD2IvoiMR0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736972636; c=relaxed/simple; bh=9kSrgu7AibgYBpB8rXYG4+d7CmN1e5r0LBFoLeexmUk=; h=Message-Id:In-Reply-To:References:From:Date:Subject:MIME-Version: Content-Type:To:Cc; b=t+fpqlwn/DvMlR7lMZghSE80os95dw/X/JghZ9cvzw6km6um08axaYXcbUnkwxXIklRDrstGAsIU8XJcWDc9i+N9+xiGEqdYwmmexynn0ovh5bexx1/LPQKUwpPHGGLN3C0WqKRC2OJwiCmO0g00XRvTdpvN4nMfNAENyenAObU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DPu4Esvr; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DPu4Esvr" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-436202dd7f6so1246015e9.0 for ; Wed, 15 Jan 2025 12:23:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736972632; x=1737577432; darn=vger.kernel.org; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=sw3Zg/upD1GF2TTxaqBOYGHuedyS5wJfBxjZ8c/mhHA=; b=DPu4EsvrccmTUhK90/OppByurdg9x5rbBWdWhAO5UbNsFe2WiialcyrkQ0PME0OuWc /hVcJnVx/ZWWBK3ThyYr62VbdMYqvNJXPBo7Bqy5iMclvKLvDL1b1yEOeU0/19QIKPHu tWKJdeplcfHMD+1CiacPrvevbDArwdCPFNLS6goZB0k/wxyU3ENWSd3k6J5/21xAVfd9 fnh5mpqWw+VH0bKdwcrrKiFeLNoD5RemCGrgaU/jU3GblZwF8hIPWEoPL5cJg/8QvevM gDpiHHB+yipdoSYwhGSG1Bun4dv6sdXIiua3BOjcLw0OeZ0HiNTJTI374qaA91wRqLR8 5RLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736972632; x=1737577432; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sw3Zg/upD1GF2TTxaqBOYGHuedyS5wJfBxjZ8c/mhHA=; b=eL++vwuqfwnhd4eWGIH+kEqnVj4S4Zos11Zazgy6QUq41cBXkNffmFd4l983xNCzoy kglDELagm+DrtZCPgqYjQ+slfW60UT0leZesqdZ/XvaTVRaayGRNidhj5UczSsre08uN qBAKJq3ChF3swECTo6apzcEypt3w/gBcZ0LqgJruasL5FnMzfnwttvEZexOk39joR0Va B7N6ofzu0/c9/cA/Nm9dxOPRglreNYt4I5QTP9VdA3DBRyV0sjEDbC/OWKv6EYmIxubs UdxsY2vH++usmrtMlxH8+mWyZbSiGCe67QQkuv0+fswS4jxeSZV/VWcY4BLCaJbt8cMv 2Jeg== X-Gm-Message-State: AOJu0YwBB7uKjiIsjjhtR5JMXDIThEyqXSfJ7l6mh+tNorCoRomiMyM8 iVGDGLEQE9z4JphTYdk2vIdfqLBZNFCM161ZJG8Otw2i6Dc0vihqJ4pNIQ== X-Gm-Gg: ASbGnctygzqfITT7rSFuqVSrR8fXTzgP/SUAQX4XG56vHI8yCNWd0VEm1kerOUGM7Qk aTVD3OR55/ATy5bs+C7ahwjpHWL3ryhlwcNImjCnKYLTHqdVXVEIykxNSfZcVYGdyx7QW3A5udl bFABg2yUKe/OQYT8l1Kgb8F/qYLZ1bszmaWzetRxjxQQtPDhnFiF1xdSW3aT2OvPJaUrOpTIpfo YnBVf86NgZ/KUx5WmKdWBTZEvqq8Qb9mRSMtVjcc0xl0akBcvoqCFUL5g== X-Google-Smtp-Source: AGHT+IGIV9m5jF2ZlgToVN8MgsP3B7ds55KtUs03bOxmIvxxHHgW5Xqsus5wqIDEVbBrTn8OiQqAAg== X-Received: by 2002:a05:600c:4f09:b0:434:a5d1:9905 with SMTP id 5b1f17b1804b1-436e27070bcmr247879195e9.26.1736972631901; Wed, 15 Jan 2025 12:23:51 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c73e370fsm35338135e9.0.2025.01.15.12.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2025 12:23:51 -0800 (PST) Message-Id: In-Reply-To: References: Date: Wed, 15 Jan 2025 20:23:45 +0000 Subject: [PATCH v2 2/5] doc: the mode param of -u of git commit is optional Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Patrick Steinhardt , =?utf-8?q?Jean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No?= =?utf-8?q?=C3=ABl_Avila?= From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Fix the synopsis to reflect the option description. Signed-off-by: Jean-Noël Avila --- Documentation/git-commit.txt | 2 +- builtin/commit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index e37c4a4987e..f5d702205d2 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -8,7 +8,7 @@ git-commit - Record changes to the repository SYNOPSIS -------- [synopsis] -git commit [-a | --interactive | --patch] [-s] [-v] [-u] [--amend] +git commit [-a | --interactive | --patch] [-s] [-v] [-u[]] [--amend] [--dry-run] [(-c | -C | --squash) | --fixup [(amend|reword):]] [-F | -m ] [--reset-author] [--allow-empty] [--allow-empty-message] [--no-verify] [-e] [--author=] diff --git a/builtin/commit.c b/builtin/commit.c index ef5e622c077..a7315ed67cc 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -44,7 +44,7 @@ #include "trailer.h" static const char * const builtin_commit_usage[] = { - N_("git commit [-a | --interactive | --patch] [-s] [-v] [-u] [--amend]\n" + N_("git commit [-a | --interactive | --patch] [-s] [-v] [-u[]] [--amend]\n" " [--dry-run] [(-c | -C | --squash) | --fixup [(amend|reword):]]\n" " [-F | -m ] [--reset-author] [--allow-empty]\n" " [--allow-empty-message] [--no-verify] [-e] [--author=]\n" From patchwork Wed Jan 15 20:23:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 13940892 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF07A1D90DF for ; Wed, 15 Jan 2025 20:23:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736972637; cv=none; b=W1DItHSU+MJQac6/fxZzJ9kVCXrNjkPvB8HYL/64SC9Fln7IODSpU/kNclmo2QZQ6z4RmeOQPEZW9OaclHkAHP1lmuGtcV6vmfM7NQFOdhlVSCPiYLnC7wAzcFLi2NUtXM/EU8r9puC0KpzUzz9GqVf/0opAC1Id/biJBGKHs0o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736972637; c=relaxed/simple; bh=1+qaz7P0KKY6t735LAfh7R0uHij4tAU09pyFKt5z/1o=; h=Message-Id:In-Reply-To:References:From:Date:Subject:MIME-Version: Content-Type:To:Cc; b=HSkcIRlUiY26qyZj+5SmU6iOKIjBGQWeJjXNaZ8THN67sDl8/2dxjflco+2qDroweAgFXoD0ZPGRI2AqGRXVjSAvfmBd0Q1swEpbwjX0ttzfiIQ4uynP5fS6qRdbqoScZOh/bsDBufU4Bwq4T6BG3h3cljz4OI5Hp2OkvuOFGck= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YMiHOrjc; arc=none smtp.client-ip=209.85.221.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YMiHOrjc" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-38789e5b6a7so136114f8f.1 for ; Wed, 15 Jan 2025 12:23:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736972634; x=1737577434; darn=vger.kernel.org; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=Vs3JHoYTc48IEYhkKsU1dsQt8VPmP4m4L4qPvQZiUFg=; b=YMiHOrjcvBwj3gmdEeDqC/czwOQNXrbT5BEF+Y0qwuq/RbwsGBAg1k9pbSM9bbqEso Bc0YSfZj1CFgJo7epOv9Mx4NldyOzwap1TYdVLZtKtyiK710ZDW8jLzddPNOqja8/7Ro nbNeMl11WYBY4rHqyCN+Y1vIzYarwH+G5s/UzDaYWsixM1BxCNLYiq8XIp0/0B8M01++ i7vxN0m9Z7OZMMijtVwTkVCp8MQe0OUkb0veRp54TaIfsoO3iIVdCAS44Qvd2M/gGXAF lw4ItywE6gpEym7gQD8Ud9ND3rlUeyjYEJ6Gcab/G2XSKfbn0UnoE1XzBBcfPBxNeH6a 19mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736972634; x=1737577434; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vs3JHoYTc48IEYhkKsU1dsQt8VPmP4m4L4qPvQZiUFg=; b=iCTEQwiVcuHYlk1oaz/DwZGYC8ECHXWA0PElfxXbdJeYyWLSo13msiQuIfWIQtgZv9 SCS24bvCiTc3GnpnbrCPpLtZnxaDF50wAojimFlJQ6a/IeclOVMRFmBXTadPQRx0k5SJ Vqe6Taqshc4ev2Gfn92RJwAIcoVgQU7u33LimOT2PRT1wTtNgXXVTd+B+t6wbaB+mqIm 7eCd58/U1HAqihqR+4EvG8A9LzFAy+EaZTjS29+kdgi4gKf0l+fLFY1GrBzPISjG8xHC jXbAea4w1/FTQLd4CMmNuRzXR8iyVHmcxXjm8GhRxAUxts4XLukclNjxK9phlfNzIekt vkDA== X-Gm-Message-State: AOJu0Yz+b91Dz9QE3bmSOFl2NfPyTr1QmWvLRtbmyr/0T3JnKfXh9RGC sBzuuH3SlvtQd7Ll2Nqd+8sfsfjZIgq7CIgkTpbeBQV0ZFbK62g8PvjlEA== X-Gm-Gg: ASbGncuUmlZO4yY/JAqjezUUrAxlv+/CNpavP5tAeuvDSbIwXENZzvcfg47D4aDihYM hyb/0TsVRPOiP2eLdzqCFS8hyV590w/yMlE3EyWKMqCa4q2PkK/cZnsAyyXLPwUoRRQPwKUD0Bc L9BxThP2B6oNk3oULyz/6cZ9DcyIpiVKLon7WxTlSCYkUJG2yyIpQthrarp8Dzn+ISEC61SJWDs bd/50WTTxHPbmYxs2wW//CvGXXi2tKtRABPCI7hqll3Vd7vjqHCJADKOA== X-Google-Smtp-Source: AGHT+IGRA84I3Tj17CLfklQYSmSx5empc3fBrfd6hqpxhsjnzLYsVIrP925iEHcYtN04DMycpEhr7A== X-Received: by 2002:a5d:47c4:0:b0:38a:41f8:8abf with SMTP id ffacd0b85a97d-38a87312917mr29245269f8f.31.1736972633427; Wed, 15 Jan 2025 12:23:53 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c74ac5f9sm34010105e9.11.2025.01.15.12.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2025 12:23:52 -0800 (PST) Message-Id: <39db87ff906744f45ef83d9d66fb914417c350a9.1736972628.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Wed, 15 Jan 2025 20:23:46 +0000 Subject: [PATCH v2 3/5] doc: make more direct explanations in git commit options Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Patrick Steinhardt , =?utf-8?q?Jean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No?= =?utf-8?q?=C3=ABl_Avila?= From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= - Use imperative mood - make use of the placeholder format to simplify style Signed-off-by: Jean-Noël Avila --- Documentation/git-commit.txt | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index f5d702205d2..602e2f1200b 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -66,7 +66,7 @@ OPTIONS ------- `-a`:: `--all`:: - Tell the command to automatically stage files that have + Automatically stage files that have been modified and deleted, but new files you have not told Git about are not affected. @@ -166,7 +166,7 @@ See linkgit:git-rebase[1] for details. `-F `:: `--file=`:: - Take the commit message from the given file. Use '-' to + Take the commit message from __. Use '-' to read the message from the standard input. `--author=`:: @@ -181,7 +181,7 @@ See linkgit:git-rebase[1] for details. `-m `:: `--message=`:: - Use the given as the commit message. + Use __ as the commit message. If multiple `-m` options are given, their values are concatenated as separate paragraphs. + @@ -190,7 +190,7 @@ The `-m` option is mutually exclusive with `-c`, `-C`, and `-F`. `-t `:: `--template=`:: When editing the commit message, start the editor with the - contents in the given file. The `commit.template` configuration + contents in __. 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 @@ -213,8 +213,7 @@ include::signoff-option.txt[] `-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. + Bypass the `pre-commit` and `commit-msg` hooks. See also linkgit:githooks[5]. `--allow-empty`:: @@ -224,13 +223,12 @@ include::signoff-option.txt[] is primarily for use by foreign SCM interface scripts. `--allow-empty-message`:: - Like `--allow-empty` this command is primarily for use by foreign - SCM interface scripts. It allows you to create a commit with an - empty commit message without using plumbing commands like - linkgit:git-commit-tree[1]. + Create a commit with an empty commit message without using plumbing + commands like linkgit:git-commit-tree[1]. Like `--allow-empty`, this + command is primarily for use by foreign SCM interface scripts. `--cleanup=`:: - This option determines how the supplied commit message should be + Determine how the supplied commit message should be cleaned up before committing. The '' can be `strip`, `whitespace`, `verbatim`, `scissors` or `default`. + @@ -259,10 +257,9 @@ variable (see linkgit:git-config[1]). `-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. + Let the user further edit the message taken from __ + with `-F `, command line with `-m `, and + from __ with `-C `. `--no-edit`:: Use the selected commit message without launching an editor. @@ -320,7 +317,7 @@ FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].) paths are also not required, and an empty commit will be created. `--pathspec-from-file=`:: - Pathspec is passed in __ instead of commandline args. If + Pass pathspec in __ instead of commandline args. If __ is exactly `-` then standard input is used. Pathspec elements are separated by _LF_ or _CR_/_LF_. Pathspec elements can be quoted as explained for the configuration variable `core.quotePath` From patchwork Wed Jan 15 20:23:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 13940893 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE9FA1D959E for ; Wed, 15 Jan 2025 20:23:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736972638; cv=none; b=EVU2upmlGDR/+RAdKrF8t9esWh73QopIq7BCK/EbrtEVUosjeD5XKacUgDccrrqPr+WA6XVGHwA0/hDhv5x1zw/EZ8uhpMeMBra6apLYMxpF7EG1qgAPNaGpQlwSwpVnGkGjP2aiJMEkUdIV0yHLveFxu/KWUb8cmxsRYYZqwfk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736972638; c=relaxed/simple; bh=efnIpStd5jHGO1ve/52THf/x12gFpGmXfsj3McIpR+Q=; h=Message-Id:In-Reply-To:References:From:Date:Subject:MIME-Version: Content-Type:To:Cc; b=sQaGB3PF+Rg/BMEFA7rdKPzERy+BzjvOEmBxQnL+D/62RRHQwUkY8xLgVLsNA9oz1+rdLrhO0Xa3c3mAeKKL80YRSVAxUogE1Kuj/E1E58nZKByfc81PdMKZt6ZYsCXrhuZ4vWHFW/WRKip9kVja8GyV7F1KaiF+xn4wj5oi0V4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eEv1sv0O; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eEv1sv0O" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-43635796b48so1489465e9.0 for ; Wed, 15 Jan 2025 12:23:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736972635; x=1737577435; darn=vger.kernel.org; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=VV3Tnhd4Lkpqe31w4AFtjUiY/lPcnfC0zvcd0UAd0u0=; b=eEv1sv0OxnIHHKhvWG5cZ6iQy2lQlOcjt3bBOSpOvFO+lCrxzdQLIltAA80u1sYs8Y F8FtV+tyaYIzO0C/ucVVyMsNwcNBLFt3248uMkJTNqDO3Goo2kFuhGAPb8BjWkFqtq8I 99X10nGJggM4KWcTugYW221tnz9vRqBXr59/d59379fnv7WRjX6HoV7fi2CjdziZB1ob dM8bBFO+aPQIHEc+6ZZ6PVrDrpLL6v44eDB57rMJZNdMA2WRxRVjm+5uQFdmRQeARoh6 X8xcANJvuRGS3m+MQkC5I9xpd8thBnAiLzp2osLIQUDM0AnqQPD9QNQcH9bspc+Khf+f gGqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736972635; x=1737577435; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VV3Tnhd4Lkpqe31w4AFtjUiY/lPcnfC0zvcd0UAd0u0=; b=wVUTGVZvoq9uDaj2Ofdzg0vA+S5LKfIrH4XSDvaZFxNxe7lcZU//rG5vG4L4SHKWfp HhuTlL4fhFdcvhJ+uk35255qbPEmTUBrcq4kA/rlA1d6NSFCTWb+DkU2jANQbn8eRIjC i8zaMNo1VxlqBAjh3g3WMydsxVQQ9aE1qLRihPULavsoa8aWfcET9VOJRS/9ko0h7VGG 0BMHeVnyJaI9/EjcrSLprtv7rSX0UUS9neYLwOLHDzQQ/XQQHsnMIWpORwIkK8KJjA1c mXjI4tf8Z9fJQHlub9nf1rB3jCw5Vlerfb+oybsjbqjdy6bsKrwllgC1lsF/p0pDI+Wt NfBA== X-Gm-Message-State: AOJu0YxgnMlw4mo+wGtkwI5w5cQMuHwenIFoGZA4JAT+8J6iLFfHiVDD 0rj6jQitob1J57D6ZroC0QtjeMXKrtYq+2KP7qauxTwqqVLJu0N7RCjQLg== X-Gm-Gg: ASbGncsh0ptT5QqO1NjnZmoizqvqou3B3u9Pxm1dewHaCIm+87EFWcxRBqUbmKVJMQf 3lM8HJ9zMNgz0iFZE7AuGh1c5WiBVVcilb2RsR1sShrGxNXldFFZdcBSTbv5kYX2r7x9Qg97vjj 3/nXvUt5J6Dp20fyCN1L82hezH1vmNR7n38ai2LgLq6lTiMXwbtwvKDFyexu8KJl4W7jO0XgBaA B1hBNISvagYjdwoJ3TwFEwUhTRQr9JqXtLaKvyD+vLXx9IPqqoCw5osfA== X-Google-Smtp-Source: AGHT+IG5IOT7FHQ/F0rymUmJUVHETU/cRUeGJ8FPpExW2fri3cJy6orxhgV7+Fhbx4RPIM3WNz3hcg== X-Received: by 2002:a05:600c:218e:b0:434:e65e:457b with SMTP id 5b1f17b1804b1-437c6ae9bdcmr38623305e9.3.1736972634544; Wed, 15 Jan 2025 12:23:54 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c753cc1fsm35200615e9.39.2025.01.15.12.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2025 12:23:53 -0800 (PST) Message-Id: <9216554bd7096f2543e987fc7fd20f5e64630187.1736972628.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Wed, 15 Jan 2025 20:23:47 +0000 Subject: [PATCH v2 4/5] doc: convert git commit config to new format Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Patrick Steinhardt , =?utf-8?q?Jean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No?= =?utf-8?q?=C3=ABl_Avila?= From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Also prevent git-commit manpage to refer to itself in the config description by using a variable. Signed-off-by: Jean-Noël Avila --- Documentation/config/commit.txt | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/Documentation/config/commit.txt b/Documentation/config/commit.txt index 62f0d92fda5..d3f4624fd27 100644 --- a/Documentation/config/commit.txt +++ b/Documentation/config/commit.txt @@ -1,29 +1,34 @@ -commit.cleanup:: +ifdef::git-commit[] +:see-git-commit: +endif::git-commit[] +ifndef::git-commit[] +:see-git-commit: See linkgit:git-commit[1] for details. +endif::git-commit[] +`commit.cleanup`:: This setting overrides the default of the `--cleanup` option in - `git commit`. See linkgit:git-commit[1] for details. Changing the - default can be useful when you always want to keep lines that begin + `git commit`. {see-git-commit} Changing the default can be useful + when you always want to keep lines that begin with the comment character `#` in your log message, in which case you would do `git config commit.cleanup whitespace` (note that you will have to remove the help lines that begin with `#` in the commit log template yourself, if you do this). -commit.gpgSign:: - +`commit.gpgSign`:: A boolean to specify whether all commits should be GPG signed. Use of this option when doing operations such as rebase can result in a large number of commits being signed. It may be convenient to use an agent to avoid typing your GPG passphrase several times. -commit.status:: +`commit.status`:: A boolean to enable/disable inclusion of status information in the commit message template when using an editor to prepare the commit - message. Defaults to true. + message. Defaults to `true`. -commit.template:: +`commit.template`:: Specify the pathname of a file to use as the template for new commit messages. -commit.verbose:: +`commit.verbose`:: A boolean or int to specify the level of verbosity with `git commit`. - See linkgit:git-commit[1]. + {see-git-commit} From patchwork Wed Jan 15 20:23:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 13940894 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6CFC1D9A6F for ; Wed, 15 Jan 2025 20:23:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736972639; cv=none; b=FuixUQUXJ8K7+dvHVijBLctzwEBFTR48MZB9ezPBy6oJm77UWeeBGCKF/OtwU9g6VKpqFGrAAaFtcwGCJYlqAexbmNoG7NnWz4p3ThRR1OP1IIcyHw56ZTtyd0/M0R5j+EqbtH4xN0c2L7aRbsCsV7Gv1fOMpOHLY1uNpOUzwtE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736972639; c=relaxed/simple; bh=2eBcb7RA2kvcWQcXhaD7FWqs3zKlJ0Dosw4LDoJ6jlQ=; h=Message-Id:In-Reply-To:References:From:Date:Subject:MIME-Version: Content-Type:To:Cc; b=DheyIk9beintFJyFf0McegaBAUvBdLcq825/o4XLi7iMTa0q1omO7cte7Ak7XenC/kicjVo9m38RRiP6IUvReOV1992vpiUH/mftWCPyEsDs3l6r2zL2ZYN1GpFe4Xh74DpLd2/+9xwIdCiLJWEEtuMo09hf/lbgNL9gkV00sEk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iriraD4I; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iriraD4I" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-43622267b2eso1117865e9.0 for ; Wed, 15 Jan 2025 12:23:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736972635; x=1737577435; darn=vger.kernel.org; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=2bkiYjWCsNGEalujTo0xma0moIRxCzBGYwSSvnuPR14=; b=iriraD4IwINFS7fZThQXYyCF9+qCcc5v7ZRtouYXqSkvtkzn3w28shawxGDaVZ79oP Yi9Cm9doXaiPw3vFVLQu/Sy8l6ZH7lS1hNJX7WAoGCEzBjUlHmbsMrHhtH/jUtVy7gVV Zw9G1G6HlGRri8rjpXHi3RNfjFgclfKlF/stOwnZP8v/q+IQIDDhYfHshYvQJRFFeHoQ A1Dj8LeXrp0WaaAtTIjdIgJ7HnWaYt6K99unDgH+3Jp/s6EWyA3bF7D0Uq8ZLwGWSBj1 DjluBs9bOrvk7PkJ+HvcObL10BoJq/SAt0E6cNkVY2j/Ro/5riVOVdtW4WtedAgcmZ1z N+Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736972635; x=1737577435; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2bkiYjWCsNGEalujTo0xma0moIRxCzBGYwSSvnuPR14=; b=nNmWqJOSGN6HH71DHibXt5LwcZGSDQve7tDjQygYIAyQv7HBz5u5BhpdWbQTtyJJp1 jxt1C/2x4omzRNmiexZ1XlGNvg96QinyrN8xzMSweK0xCMoZvVDfzd+Azf2lDxnyitz+ SOES9fFHa8ggLQ+gj7BUcDHvTxuCh1k9zCjwlkW1QVca7Tl761n9kQ3PXzIWl3fHfJdb b3iTW6s8HY9kDeTrd1W8quJzpxEOtng+vfxmPr4WbVJuGvfZJQ7bYW+EmYMSlQJq+HB8 djYIEz3eBreaOkeck9uWWfLvs372VRRROISoYC12ankr4O+I2T6q6F4z9FaNoe8PO+nC e9Hg== X-Gm-Message-State: AOJu0YzY4j/HajDemlhAyi+dGfyUlXfxefR13J7GpOnev5tuLdcMmQd/ u/+GR7UTwZAzMbjUKiGhC5SXRKuHebkSCNJARnvtKr2g2ZcuRqeuE84dLw== X-Gm-Gg: ASbGncsVL7PJ4voSfd/z5MBIKsmc4XMEIFoJplSvLYDK4HA7u62+b9E+xfBFVgNyzU+ ndpHKoVUdFJnfCndL3hcP8JgoB6WMShwYqAdMkua75OPPDFhe3fCNV4IEwOJMSYQwtys9nSP1nM IKTvYG8e65Y1IKKEP17UznOB59ELIZFdsBoqes7yeQvfWYIcV+I1xyi2+2zfQyGqs41re4xXSg6 2UXG+r/OgysdQjfsEr7GAeoBn2zS67A2WfI2kdqVjcKHujtGIAw2weB1A== X-Google-Smtp-Source: AGHT+IE71xHaJcrd9X7bBj63fFDxeZqRUAt3KDIVaj71ueHxhmzsKxeBgyU6NwNCRUhg6ETVDEEvMA== X-Received: by 2002:a5d:6c6e:0:b0:388:c61d:43e0 with SMTP id ffacd0b85a97d-38a8733b9e8mr32787060f8f.48.1736972635265; Wed, 15 Jan 2025 12:23:55 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e4c3428sm18116145f8f.87.2025.01.15.12.23.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2025 12:23:54 -0800 (PST) Message-Id: <28316a709da913c624873291d96ed5aeddc6fc90.1736972628.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Wed, 15 Jan 2025 20:23:48 +0000 Subject: [PATCH v2 5/5] doc: migrate git-commit manpage secondary files to new format Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Patrick Steinhardt , =?utf-8?q?Jean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No?= =?utf-8?q?=C3=ABl_Avila?= From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Signed-off-by: Jean-Noël Avila --- Documentation/i18n.txt | 4 ++-- Documentation/signoff-option.txt | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/i18n.txt b/Documentation/i18n.txt index 3a866af4a42..baff780a7e3 100644 --- a/Documentation/i18n.txt +++ b/Documentation/i18n.txt @@ -34,7 +34,7 @@ project find it more convenient to use legacy encodings, Git does not forbid it. However, there are a few things to keep in mind. -. 'git commit' and 'git commit-tree' issue +. `git commit` and `git commit-tree` issue a warning if the commit log message given to it does not look like a valid UTF-8 string, unless you explicitly say your project uses a legacy encoding. The way to say this is to @@ -50,7 +50,7 @@ of `i18n.commitEncoding` in their `encoding` header. This is to help other people who look at them later. Lack of this header implies that the commit log message is encoded in UTF-8. -. 'git log', 'git show', 'git blame' and friends look at the +. `git log`, `git show`, `git blame` and friends look at the `encoding` header of a commit object, and try to re-code the log message into UTF-8 unless otherwise specified. You can specify the desired output encoding with diff --git a/Documentation/signoff-option.txt b/Documentation/signoff-option.txt index d98758f3cb7..cddfb225d1d 100644 --- a/Documentation/signoff-option.txt +++ b/Documentation/signoff-option.txt @@ -1,8 +1,8 @@ ifdef::git-commit[] --s:: +`-s`:: endif::git-commit[] ---signoff:: ---no-signoff:: +`--signoff`:: +`--no-signoff`:: Add a `Signed-off-by` trailer by the committer at the end of the commit log message. The meaning of a signoff depends on the project to which you're committing. For example, it may certify that @@ -14,5 +14,5 @@ endif::git-commit[] leadership of the project to which you're contributing to understand how the signoffs are used in that project. + -The --no-signoff option can be used to countermand an earlier --signoff +The `--no-signoff` option can be used to countermand an earlier `--signoff` option on the command line.