Fix a botched log-message
Stephen J. Turnbull
stephen at xemacs.org
Wed Apr 2 21:35:31 BST 2008
John Arbash Meinel writes:
> I don't know of any distributed VCS that lets you modify commit
> information such as this. Specifically both Mercurial and Git
> include the commit message in the sha1sum that identifies the
> commit. So modifying it genuinely creates a new commit.
But that is not a problem in principle because git object names are
not intended to be human-memorable, and in some sense git doesn't
"create" its objects, it "exposes" them. Unless you do git-gc
--prune, the old commits don't disappear, either. The problem comes
in because there's no mechanism to propagate the changes in references
like tags and branch heads to downstream users.
AIUI git's reflog facility is intended to address this issue. Whether
it does so successfully, I can't say.
> And as their sha1 hashes are chained (the parent has is part of the
> hash of the child), then you have the same need to do a
> modification and then rebase all of the commits from it,
This isn't really a rebase, because the tree objects don't change, and
it's very fast.
> Monotone and darcs *might* allow you to modify them.
Darcs does. It's called "amend-record", and actually allows you to
change the content of the patch, but can be used to change only the
log. However, this is dangerous in Darcs because (part of) the commit
message is the common name of the patch.
More information about the bazaar
mailing list