[PATCH] commit: add --allow-empty flag

Jordi GutiƩrrez Hermoso jordigh at octave.org
Fri May 8 13:07:25 CDT 2015


On Fri, 2015-05-08 at 16:04 +0000, Durham Goode wrote:

> On 5/7/15, 4:51 PM, "Jordi GutiƩrrez Hermoso" <jordigh at octave.org> wrote:

> >On Thu, 2015-05-07 at 15:10 -0700, Durham Goode wrote:

> If we want to balance out the UI clutter, let's hide --secret.

No. This is the only way secret commits can be created without
--force. I think it should stay visible.

Just one more option isn't a lot of clutter, though. But perhaps
*this* --allow-empty option should be hidden? Do we have precedent for
hiding some advanced options under --verbose?

> >I don't understand. Is there a reason why all of these must be
> >**kwargs instead of an explicit extra allowempty option?
> 
> **kwargs makes these extensions more robust to future api changes.

Fine, but then this is an unrelated change, right? Split the patch.

> >Or perhaps the whole cset could be simplified by simply calling
> >commit(..., force=(force or allowempty), ...)
> 
> You're right.  I can pretty this up in a V2

Or just expose the force option as a --force flag? I don't think
anything else can be forced other than empty commits, can it?

No, wait, yes it does. The force option also has consequences for
subrepos or for committing files that weren't specified in the CLI. I
guess it really needs a whole new option.




More information about the Mercurial-devel mailing list