From: "Carlos Martín Nieto" <cmn@elego.de>
To: git@vger.kernel.org
Subject: [PATCH] Documentation/git-commit: reword the --amend explanation
Date: Wed, 3 Apr 2013 15:07:21 +0200 [thread overview]
Message-ID: <1364994441-15961-1-git-send-email-cmn@elego.de> (raw)
The explanation for 'git commit --amend' talks about preparing a tree
object, which shouldn't be how user-facing documentation talks about
commit.
Reword it to say it works as usual, but replaces the current commit.
---
The current text is from 2006, which I guess explains the wording.
Documentation/git-commit.txt | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 42c22bb..48dac29 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -198,14 +198,11 @@ OPTIONS
without changing its commit message.
--amend::
- Used to amend the tip of the current branch. Prepare the tree
- object you would want to replace the latest commit as usual
- (this includes the usual -i/-o and explicit paths), and the
- commit log editor is seeded with the commit message from the
- tip of the current branch. The commit you create replaces the
- current tip -- if it was a merge, it will have the parents of
- the current tip as parents -- so the current top commit is
- discarded.
+ Amend the tip of the current branch. The commit is prepared as
+ usual (including -i/-o and explicit paths) and the editor
+ starts off with the current tip's commit message. The new
+ commit has the same parents and author as the current one and
+ replaces it as the tip.
+
--
It is a rough equivalent for:
--
1.8.2.524.g8f8def7
next reply other threads:[~2013-04-03 13:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-03 13:07 Carlos Martín Nieto [this message]
2013-04-03 15:01 ` [PATCH] Documentation/git-commit: reword the --amend explanation Junio C Hamano
2013-04-03 20:04 ` Junio C Hamano
2013-04-03 22:25 ` Philip Oakley
2013-04-04 16:49 ` Carlos Martín Nieto
2013-04-04 17:04 ` Junio C Hamano
2013-04-05 8:50 ` Carlos Martín Nieto
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=1364994441-15961-1-git-send-email-cmn@elego.de \
--to=cmn@elego.de \
--cc=git@vger.kernel.org \
/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).