Changing a commit message

Stuart McGraw smcg4191 at frii.com
Tue May 13 21:08:33 BST 2008


Raúl Núñez de Arenas Coronado wrote:
> Saluton Ben :)
> 
> On Wed, 14 May 2008 00:14:35 +1000, Ben Finney dixit:
>> Raúl Núñez de Arenas Coronado <raul at dervishd.net> writes:
>>> On Tue, 13 May 2008 21:43:13 +1000, Ben Finney dixit:
>>>> [wanting to change commit messages] is at odds with wanting to
>>>> change history in the first place. Surely if wanting the commit
>>>> history to be unchanged, one would also want the commit messages
>>>> to be unchanged.
>>> Probably, but I want the commit history unchanged and the commit
>>> messages without typos ;)
>> The commit message is part of the revision data.
> 
> I know, I shouldn't be changing revision data, and this looks reasonable
> to me: if you want good commit messages, write them right!

By the same argument we don't need debugging or refactoring
tools -- simply write bug-free and correctly designed code
in the first place.

> Wanting to change the commit messages is weird, and until Subversion I
> never thought about doing that. The fact that you can change them in
> Subversion with svn-admin doesn't mean that this is a desirable
> behaviour in a VS, and clearly it is NOT desirable in distributed VS's.

I disagree, it is perfectly reasonable desire, and the lack
of this capability is a defect (IMO) in two DVCS I am interested
in.

>>> As I told, I come from a centralized VS and I have to change my way
>>> of work and think. In the future, I'll try to be much more careful
>>> with commit messages.
>> A better way to change your way of thinking would be to accept that
>> the commit messages are part of history, that a VCS is designed to
>> record history, and abandon the idea of trying to change history.

There is no value to the vast majority people to preserving
a history that documents "the" was spelled "th" at commit time.
There is almost always a negative value to documenting that a
a committer typed "fixed bug id 1230" instead "fixed bug id
1235", especially when (as you point out) one cannot simply
commit a corrected message like one can with a file.

> Good point ;))) Anyway, if I want to change part of the history (e.g.
> fixing a bug in my program) I just make modifications and commit a new
> revision. If I want to change another part of the history (the message
> of some commit) I cannot, because they are very different parts of
> history. Given this, it's difficult for me to think about commit
> messages as part of history. For me, they are only little notes attached
> to revisions. I have to start thinking about them as immutable ;)
> 
> Again, thanks for your answer. I now see things differently.

Too bad, I wish more people would recognize it for the problem
it is an agitate (or better, propose code) that fixes it.

> Raúl "DervishD" Núñez de Arenas Coronado




More information about the bazaar mailing list