From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: rhys evans <rhys.evans@ft.com>
Cc: git@vger.kernel.org
Subject: Re: Fwd: Possible bug report: `git commit -ammend`
Date: Fri, 15 Nov 2013 16:54:56 +0100 [thread overview]
Message-ID: <vpqsiux1wz3.fsf@anie.imag.fr> (raw)
In-Reply-To: <CAMyx444wJeQUpxZmXmYx-mKE0kniO=ELo5HgzQ1unV4O15oxWw@mail.gmail.com> (rhys evans's message of "Fri, 15 Nov 2013 15:44:18 +0000")
rhys evans <rhys.evans@ft.com> writes:
> I ran `git commit -ammend` on a repo where 1 out of 3 files changed
> were staged for commit.
>
> I would've expected an error to be thrown due to the double typo but
> instead it committed all 3 files with the message 'mend'.
>
> So it looks like it interpreted it as `git commit -a -m 'mend'`.
Yes. This is a rather widespread convention (e.g. rm -fr == rm -r -f).
Git does a special-case for -amend to avoid confusion:
$ git commit -amend
error: did you mean `--amend` (with two dashes ?)
But it did not special-case the double-typo.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2013-11-15 15:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAMyx446B1U30RL9X7vOrY-u7fQ_cEqRJxn_M8Wn8PuOJhdO-1Q@mail.gmail.com>
2013-11-15 15:44 ` Fwd: Possible bug report: `git commit -ammend` rhys evans
2013-11-15 15:54 ` Matthieu Moy [this message]
2013-11-16 3:28 ` Duy Nguyen
2013-11-16 4:02 ` 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=vpqsiux1wz3.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=rhys.evans@ft.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).