git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] commit: add an option to reword the last commit
@ 2020-09-21 13:30 Phillip Wood via GitGitGadget
  2020-09-21 13:30 ` [PATCH 1/3] commit docs: use backquotes when quoting options Phillip Wood via GitGitGadget
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Phillip Wood via GitGitGadget @ 2020-09-21 13:30 UTC (permalink / raw)
  To: git; +Cc: Phillip Wood

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-09-24 16:58 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 13:30 [PATCH 0/3] commit: add an option to reword the last commit Phillip Wood via GitGitGadget
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

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).