Wishlist: the ability to correct wrong commit messages.
Alan Mackenzie
acm at muc.de
Mon Jul 1 17:03:10 UTC 2019
Hello, Tony.
On Mon, Jul 01, 2019 at 17:57:26 +0200, Tony Mechelynck wrote:
> On Mon, Jul 1, 2019 at 4:15 PM Alan Mackenzie <acm at muc.de> wrote:
> > On Sun, Jun 30, 2019 at 23:13:47 +0200, Arne Babenhauserheide wrote:
[ .... ]
> > I also find it frustrating that I'm "editing the commit". I don't
> > want to edit the commit. I merely wish to edit ancillary information
> > which describes the commit, but isn't (needn't be) an integral part
> > of that commit.
> With Mercurial, a commit description (unlike e.g. a tag name) is
> considered part of the commit; for instance, the 40-nybble commit ID is
> computed based on, among others, the commit description.
Yes. This is unfortunate. This calculation mixes up two essentially
different types of data, so it is not surprising that the result is
unfortunate. Those two types of data are (i) the contents of foo.c and
(ii) the commit message. (i) is essential to the commit. The SW being
tracked won't build properly without it. (ii) is inessential: it is not
part of the SW being tracked, it is part of the tracking. The SW would
build just fine without it. (i) can be changed by another commit; (ii)
can't, at least not without a lot of bother.
> So any change to the commit description requires "changing the commit":
> actually it creates a new commit with a new commit ID and deletes the
> old commit. If in the meantime someone pulled that old commit, there
> is no way (other than convincing the owner of the clone pulled to to do
> it manually by means of some extension) to remove the spurious commit
> from that clone.
How about the old commit simply being replaced by the new at the next hg
pull? These two commits are essentially identical, therefore replacing
old by new is harmless. Surely? OK, you may have to update .hgtags as
well, but so what?
[ .... ]
> Best regards,
> Tony.
--
Alan Mackenzie (Nuremberg, Germany).
More information about the Mercurial
mailing list