Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 27, 2016, 06:50 UTC
- Message-ID
- <alpine.DEB.2.20.1604270846430.2896@virtualbox>
- In-Reply-To
- <xmqqd1pcdpb8.fsf_-_@gitster.mtv.corp.google.com>
Hi Junio,
On Tue, 26 Apr 2016, Junio C Hamano wrote:
Show 12 quoted lines
> @@ -1157,6 +1157,15 @@ static struct commit_list *collect_parents(struct commit *head_commit,
> return remoteheads;
> }
>
> +static void no_commit_impossible(const char *message)
> +{
> + if (!option_commit) {
> + warning("%s\n%s", _(message),
> + _("--no-commit is impossible"));
> + warning(_("In future versions of Git, this will become an error."));
> + }
> +}I think this would be a step forward in usability, and I agree that this is a great opportunity for the users who wish for this feature to get involved and drive this forward, based on your excellent initial version.
I am not sure about this double negation "no_commit_impossible" (I only understood what you meant because I had read the commit message first, something I won't do when stumbling over this code later).
Maybe something like `disallow_no_commit`?
Ciao, Dscho