Thread (1 message) 1 message, 1 author, 2016-06-15
  • (off-list ancestor, not in this archive)
  • Re: git commit --amen · Junio C Hamano <hidden> · 2016-06-15

Re: git commit --amen

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:56

Phil Hord [off-list ref] writes:
quoted
Is it normal that "git commit --amen" actually works ?
(it does like --amend)

version 1.7.10.4
Yes.  From Documentation/technical/api-parse-options.txt:

    * Long options may be 'abbreviated', as long as the abbreviation
      is unambiguous.

Apparently since 2008-06-22.
Notice "technical/api-" part; that is a _wrong_ documentation page
to quote to end users.

Instead quote from "git help cli".

       From the git 1.5.4 series and further, many git commands (not
       all of them at the time of the writing though) come with an
       enhanced option parser.
So 'git commit --am' also works.  But it should probably be avoided
because of its similarity to 'git commit -am'.
Yes, in general, you should avoid relying on shortened form
working.  Git 2.4 may add an option "--amen" that has totally
different meaning.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help