|
|
|
|
|
by johnthuss
1317 days ago
|
|
It seems like this "feature" would greatly constrain the evolution of the API if they have to preserve the shortest version of each option to avoid breaking clients. It would mean "git commit --am" always means "amend" and you can't add another option that starts with "am". |
|
> Commands that support the enhanced option parser accepts unique prefix of a long option as if it is fully spelled out, but use this with a caution. For example, git commit --amen behaves as if you typed git commit --amend, but that is true only until a later version of Git introduces another option that shares the same prefix, e.g. git commit --amenity option.
Of course that makes many flag additions technically breaking changes. This could be a surprise because if you accidentally dropped some characters you would have no warning until a Git update breaks it.