Comment 1 for bug 207507

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 207507] [NEW] "bzr commit" empty message error comes too late

On Thu, 2008-03-27 at 01:44 +0000, Stefan Monnier wrote:
> Public bug reported:
>
> Here is an example session:
>
> % bzr commit -m ''
> Committing to: /home/monnier/tmp/bzr/work/
> modified lisp/simple.el
> modified src/coding.c
> modified src/data.c
> modified src/indent.c
> modified src/keyboard.c
> modified src/keymap.c
> bzr: ERROR: empty commit message specified
> %
>
> as you can see, the error message about the fact that the commit message
> is empty only comes at the very end. Much better would be to fail
> immediately. Believe or not, I "committed" my changes twice before
> noticing that they weren't being committed.

We check the message at the end because when it is being obtained
interactively, creating a complex message is something we shouldn't
force the user to do twice - *and* the prompt we give the user may
contain the actual diff being committed so the user can see what is
being recorded.

It is possible to special case this I guess, but I wonder if it
necessary.

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.