git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: [PATCH 0/3] commit: add an option to reword the last commit
Date: Mon, 21 Sep 2020 13:30:47 +0000	[thread overview]
Message-ID: <pull.736.git.1600695050.gitgitgadget@gmail.com> (raw)

If one notices a typo in the last commit after starting to stage changes for
the next commit it is useful to be able to reword the last commit without
changing its contents. Currently the way to do that is by specifying --amend
--only with no pathspec which is not that obvious to new users (so much so
that before beb635ca9c ("commit: remove 'Clever' message for --only
--amend", 2016-12-09) commit printed a message to congratulate the user on
figuring out how to do it). If the last commit is empty one has to pass
--allow-empty as well even though the contents are not being changed. These
patches contain a couple of small clean ups for the commit documentation add
a --reword option for commit that rewords the last commit without changing
its contents.

Phillip Wood (3):
  commit docs: use backquotes when quoting options
  commit: reorder synopsis
  commit: add an option the reword HEAD

 Documentation/git-commit.txt          | 30 +++++++++-----
 builtin/commit.c                      | 46 +++++++++++++++++++++-
 t/t7501-commit-basic-functionality.sh | 56 +++++++++++++++++++++++++++
 3 files changed, 121 insertions(+), 11 deletions(-)


base-commit: 54e85e7af1ac9e9a92888060d6811ae767fea1bc
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-736%2Fphillipwood%2Fwip%2Fcommit-reword-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-736/phillipwood/wip/commit-reword-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/736
-- 
gitgitgadget

             reply	other threads:[~2020-09-21 13:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21 13:30 Phillip Wood via GitGitGadget [this message]
2020-09-21 13:30 ` [PATCH 1/3] commit docs: use backquotes when quoting options Phillip Wood via GitGitGadget
2020-09-21 13:30 ` [PATCH 2/3] commit: reorder synopsis Phillip Wood via GitGitGadget
2020-09-22  5:27   ` Junio C Hamano
2020-09-22 13:27     ` Phillip Wood
2020-09-22 16:16       ` Junio C Hamano
2020-09-21 13:30 ` [PATCH 3/3] commit: add an option the reword HEAD Phillip Wood via GitGitGadget
2020-09-21 15:43   ` Eric Sunshine
2020-09-21 18:05     ` Phillip Wood
2020-09-21 18:12       ` Eric Sunshine
2020-09-21 19:27       ` Junio C Hamano
2020-09-22 13:38         ` Phillip Wood
2020-09-22 16:54           ` Junio C Hamano
2020-09-21 17:04   ` Christian Couder
2020-09-21 18:01     ` Phillip Wood
2020-09-23 10:22   ` Johannes Schindelin
2020-09-23 18:23     ` Phillip Wood
2020-09-23 20:42       ` Johannes Schindelin
2020-09-24  9:58         ` Phillip Wood
2020-09-24 16:58           ` Junio C Hamano
2020-09-21 16:15 ` [PATCH 0/3] commit: add an option to reword the last commit 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.736.git.1600695050.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood@dunelm.org.uk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).