[bug 0.11] bzr ci -m allow no message to be specified

Matthew Hannigan mlh at zip.com.au
Thu Nov 23 12:55:17 GMT 2006


On Fri, Nov 24, 2006 at 12:13:51AM +0200, Jari Aalto wrote:
> James Westby <jw+debian at jameswestby.net> writes:
> 
> > On (23/11/06 13:53), Jari Aalto wrote:
> > > Aaron Bentley <aaron.bentley at utoronto.ca> writes:
> > > > 
> > > > It can happen under any release.  Your command there is "commit all
> > > > files, with the message 'file.txt'", and I doubt that there's an
> > > > automatic way to detect that this is not what you meant.
> > > 
> > > Oh, then make this alwasy require argument (like "."), so that this mistake
> > > does not happen by accident:
> > > 
> > >     $ bzr ci -m file.txt      
> > >     Syntax error, needs file or directory "." to commit all
> > > 
> > 
> > I don't like this idea. I think that the other proposal of asking for
> > confirmation if the message is the same as a file is a better one.
> 
> If this means interacitve questions, please don't. It will make bzr 
> inpossible to be used in scripts and backends.

That's an important point, but think it's still worth doing.
You could error out if not a terminal.

The case where the intended commit message is the name of a single
file and you want to commit every change must be _vanishingly_
rare.

The case where you intend to commit just one file but in
fact accidentally commit everything is not particularly rare,
and the consequences might be severe.  Especially in a script,
where the error might not be realised till quite a few commits
later.


Matt




More information about the bazaar mailing list