Re: [PATCH] commit: inform pre-commit if --amend is used
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 25, 2014, 04:58 UTC
- Message-ID
- <xmqqtx1nub9e.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20141125034424.GA19161@peff.net>
Jeff King <peff@peff.net> writes:
Show 12 quoted lines
> 1. It is a bit more obvious when debugging or dumping arguments (e.g., > via GIT_TRACE), especially if new options are added after the > first. > > 2. It makes it easier for a script to work on old and new versions of > git. It sees either "amend" or "noamend" for the two obvious cases, > and if it sees no argument, then it knows that it does not know > either way (it is running on an old version of git). > > Technically one can tell the difference in shell between an empty > string and a missing argument, but it is sufficiently subtle that I > think "noamend" is a better route.
If we ever add more info, would we want to keep piling on new arguments, though? Wouldn't it a viable option to use "amend" vs not giving anything (not even an empty string), so that normal case there won't be no parameter?