Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created

2016-04-27 Thread Junio C Hamano
Johannes Schindelin writes: >> > Maybe something like `disallow_no_commit`? >> >> That would be the best name once we start dying in there. It might >> be still better, even while we merely warn but let it pass, than the >> double negative. Or it may not. I dunno. > > Actually, I should admit

Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created

2016-04-27 Thread Johannes Schindelin
Hi Junio, On Wed, 27 Apr 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > 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 late

Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created

2016-04-27 Thread Junio C Hamano
Johannes Schindelin writes: > 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`? That would be

Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created

2016-04-26 Thread Johannes Schindelin
Hi Junio, On Tue, 26 Apr 2016, Junio C Hamano wrote: > @@ -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) { > +

Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created

2016-04-26 Thread Johannes Sixt
Am 26.04.2016 um 23:37 schrieb Junio C Hamano: * The necessary update to avoid end-user mistake would look like this. I am not queuing this or further working on it myself, as I am not sure if it is all that useful. Whoever picks up this patch, be warned that the i18n coding should b

Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created

2016-04-26 Thread Eric Sunshine
On Tue, Apr 26, 2016 at 5:37 PM, Junio C Hamano wrote: > A user who uses "--no-commit" does so with the intention to record a > resulting merge after amending the merge result in the working tree. > But there is nothing to amend and record, if the same "git merge" > without "--no-commit" wouldn't

Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created

2016-04-26 Thread Junio C Hamano
Stefan Beller writes: > and later > > if (!option_commit) > no_commit_impossible(_("Already up-to-date")); It would be more legible, but because there are so few callsites in an already shallow callchain, I do not think it makes that much of a difference in this codepath either way.

Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created

2016-04-26 Thread Stefan Beller
On Tue, Apr 26, 2016 at 2:37 PM, Junio C Hamano wrote: > +static void no_commit_impossible(const char *message) > +{ > + if (!option_commit) { > + warning("%s\n%s", _(message), > + _("--no-commit is impossible")); > + warning(_("In future ver

[PATCH 2/2] merge: warn --no-commit merge when no new commit is created

2016-04-26 Thread Junio C Hamano
A user who uses "--no-commit" does so with the intention to record a resulting merge after amending the merge result in the working tree. But there is nothing to amend and record, if the same "git merge" without "--no-commit" wouldn't have created a merge commit (there are two cases: (1) the other