immutable commit messages, why?

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Thu Mar 20 06:20:41 CDT 2008


On Thu, Mar 20, 2008 at 11:30 AM, Martin Geisler <mg at daimi.au.dk> wrote:
> Stuart McGraw <smcg4191 at frii.com> writes:
>  > And I would prefer a higher standard of trustworthiness: that a commit
>  > message accurately describes a changeset. Immutable commit messages
>  > are a barrier to achieving that.
>
>  Put that way, then I agree with you. Currently you cannot do a commit if
>  nothing has changed, but if that was allowed, then I could imagine that
>  empty commits would be a way to amend the commit messages:
>
>   hg status
>   M foo.c
>   hg commit -m 'Fixed bug.'          # Bad commit message.
>   hg commit -f -m 'Fixed bug 123.'   # Better message.
>
>  Here the second forced commit simply records another change message. The
>  tools that show commit messages could be taught to show the commit
>  messages of empty commits instead of the messages of parents. Something
>  like this:
>
>   % hg log
>   changeset:   1:ebcc4c481119
>   user:        Martin Geisler <mg at daimi.au.dk>
>   date:        Thu Mar 20 11:24:31 2008 +0100
>   summary (updated in 2:62164c94d09b): Fixed bug #123.
>
>   changeset:   0:f33c4b862172
>   user:        Martin Geisler <mg at daimi.au.dk>
>   date:        Thu Mar 20 11:24:12 2008 +0100
>   summary:     Added foo.c.

I quite like this idea.
-peo


More information about the Mercurial mailing list