[RFC][PATCH] Show the diff in the commit messages
Martin Pool
mbp at sourcefrog.net
Wed Jul 11 04:08:09 BST 2007
On 7/11/07, James Westby <jw+debian at jameswestby.net> wrote:
> On (10/07/07 21:28), Goffredo Baroncelli wrote:
> > Hi all,
> >
> > I found sometime useful to add at the bottom of the commit message (the one
> > which will be discarded) the diff which I will commit. So I added the
> > option "--diff" to the commit command. Obviusly the diff is only a help for
> > providing a good commit message and it will not be recorded in the log.
>
> Nice. Thanks for doing this. I used to use the vim plugin that did this,
> but the locking changes that came with dirstate broke that. I would like
> this option to be included. The changes look quite non-intrusive, but I
> have not tried it, and they will need a test or two to be included.
I like it too, and would probably use it all the time. It does need
tests though.
> What would the feelings be about providing a configuration option for
> this? Is it preferred to just use aliases to do this sort of thing?
Aliases would be the way to do it at the moment, but they do seem like
a bit of a blunt instrument. I think it'd be good if you could set
some extra options in the global or location configuration, for
example in baazar.conf
commit_options = --diff
There is general issue when setting options here that we need a way to
turn them off. We should probably make the option parser allow them
to be reversed so you can say
% bzr ci --no-diff
and that will cancel the previous definition. It's a bit more tricky
for things like -r but perhaps they're not things that people will
want to set by default.
--
Martin
More information about the bazaar
mailing list