[RFC] Ask for confirmation if the commit message is a file name
mbp at canonical.com
Thu Nov 12 07:01:23 GMT 2009
2009/11/12 Forest Bond <forest at alittletooquiet.net>:
> On Thu, Nov 12, 2009 at 12:29:32AM +0100, Gioele Barabucci wrote:
>> sometimes I mistakenly type "commit -m file1 file2", i.e. I forget to add a
>> commit message and bzr uses "file1" as the commit message. With the attached
>> tiny patch, bzr will ask the user for a confirmation in cases like that.
> I would prefer if this simply printed a warning and carried on with the commit
> anyway. It's not hard to uncommit, and requiring --force or interactive
> confirmation makes the UI behavior vary based on the presence of a file, which
> seems unpredictable to me.
It's plausible that you would have a directory called 'doc' and also
commonly commit with the terse message 'bzr ci -m doc', so it's not a
I think this is a case where it would be reasonable to merge it (to
2.1 only) and see how we like it.
The specific behaviour I think I'd prefer at first is
* if there is an interactive ui, ask
* if not, print a warning
You could do more as far as having an overall preference for "do you
want to be asked" or one specific to this situation. But, along the
lines of the patch pilot, let's not pile everything onto this one
More information about the bazaar