From: Marc Strapetz <marc.strapetz@syntevo.com>
To: git@vger.kernel.org
Subject: "git commit --amend --only --" nevertheless commits staged changes
Date: Tue, 10 Jul 2012 12:41:13 +0200 [thread overview]
Message-ID: <4FFC06C9.5050405@syntevo.com> (raw)
When using "git commit --amend --only --message <message> --", I'd
expect to have just the commit message of my last commit changed,
according to the man page:
"--only Make a commit only from the paths specified on the command line,
disregarding any contents that have been staged so far. [...] If this
option is specified together with --amend, then no paths need to be
specified, which can be used to amend the last commit without committing
changes that have already been staged."
However, all staged changes are committed as well. So looks like either
the man page or Git is wrong here!?
Tested with 1.7.10.msysgit.1.
-Marc
next reply other threads:[~2012-07-10 10:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-10 10:41 Marc Strapetz [this message]
2012-07-10 20:11 ` "git commit --amend --only --" nevertheless commits staged changes Jeff King
2012-07-10 20:14 ` Junio C Hamano
2012-07-10 20:30 ` Jeff King
2012-07-10 20:40 ` Jeff King
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=4FFC06C9.5050405@syntevo.com \
--to=marc.strapetz@syntevo.com \
--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).