git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "M Hickford via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  M Hickford <mirth.hickford@gmail.com>
Subject: Re: [PATCH] doc: use 'title' consistently
Date: Thu, 13 Feb 2025 12:27:25 -0800	[thread overview]
Message-ID: <xmqq5xldoaj6.fsf@gitster.g> (raw)
In-Reply-To: <pull.1893.git.git.1739477118350.gitgitgadget@gmail.com> (M. Hickford via GitGitGadget's message of "Thu, 13 Feb 2025 20:05:18 +0000")

"M Hickford via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: M Hickford <mirth.hickford@gmail.com>
>
> The first line of a commit message is variously called 'title' or
> 'subject'.
>
> Prefer 'title' unless discussing email.

We do use them interchangeably, but I agree that 'title' is a more
generic term than 'subject'.  There are a few other commands that
we may want to pay attenion to.

 - "git log --help" talks about "--oneline" and "--pretty=oneline",
   and they refer to "<title-line>", so we are good there.

 - "git shortlog" also says it groups the commits by author and
   title.

 - "git rebase --help" talks about "(commit) subject" when it
   discusses what appears in the todo-file, without referring to
   "title" at all.

We may want to update "git rebase" documentation to match what
happens in this patch at the same time, especially because it is its
interactive mode that "git rebase --help" uses "subject" to refer to
each commit's title.

Will queue.  Thanks.


> Signed-off-by: M Hickford <mirth.hickford@gmail.com>
> ---
>     doc: use 'title' consistently
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1893%2Fhickford%2Ftitle-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1893/hickford/title-v1
> Pull-Request: https://github.com/git/git/pull/1893
>
>  Documentation/git-commit.txt | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
> index 602e2f1200b..70a5e4a181c 100644
> --- a/Documentation/git-commit.txt
> +++ b/Documentation/git-commit.txt
> @@ -98,8 +98,8 @@ OPTIONS
>  	replaces the log message of _<commit>_ with its own log message
>  	but makes no changes to the content of _<commit>_.
>  +
> -The commit created by plain `--fixup=<commit>` has a subject
> -composed of "fixup!" followed by the subject line from _<commit>_,
> +The commit created by plain `--fixup=<commit>` has a title
> +composed of "fixup!" followed by the title of _<commit>_,
>  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
> @@ -107,7 +107,7 @@ commit, but the additional commentary will be thrown away once the
>  `git rebase --autosquash`.
>  +
>  The commit created by `--fixup=amend:<commit>` is similar but its
> -subject is instead prefixed with "amend!". The log message of
> +title is instead prefixed with "amend!". The log message of
>  _<commit>_ 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 _<commit>_, the
> @@ -128,7 +128,7 @@ See linkgit:git-rebase[1] for details.
>  
>  `--squash=<commit>`::
>  	Construct a commit message for use with `git rebase --autosquash`.
> -	The commit message subject line is taken from the specified
> +	The commit message title 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.
>
> base-commit: e2067b49ecaef9b7f51a17ce251f9207f72ef52d

  reply	other threads:[~2025-02-13 20:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13 20:05 [PATCH] doc: use 'title' consistently M Hickford via GitGitGadget
2025-02-13 20:27 ` Junio C Hamano [this message]
2025-02-16 20:40   ` M Hickford
2025-02-16 21:02 ` [PATCH v2] " M Hickford via GitGitGadget
2025-02-18 17:59   ` Junio C Hamano

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=xmqq5xldoaj6.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=mirth.hickford@gmail.com \
    /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).