Comment 2 for bug 701668

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 701668] Re: accept generated default commit message without asking

On Wed, 2011-01-12 at 03:56 +0000, Martin Pool wrote:
> It seems to me the underlying thing here is not especially udd-specific:
> if the hook generates a suggested commit message, it's reasonable for
> the user to just accept it without modification. Generally speaking if
> they exit the editor without changing it, I think we should just accept
> it.
>
> (That might mean changing the apis to distinguish between "a template
> the user can edit" and "a message the user can possibly edit or just
> accept", and I guess also "just use this without running the editor at
> all.")
>
> I think the main question then is what the user will do if, once they
> get to the editor, they decide they don't want to commit after all. The
> options seem to be:
>
> 1- we request confirmation (maybe defaulting to yes) before committing
> 2- if you delete the whole contents of the file we check that's really what you mean before committing with an empty message
>
> I guess we could later add options to control this.
>
> I think 2 would probably be reasonable, though perhaps not super
> discoverable.
2 would indeed probably be nicer.

Perhaps we can include a line "If you delete all contents in this file
the commit will be cancelled. " below the line:

-------------- This line and the following will be ignored
--------------

Cheers,

Jelmer