[RFC] (commit --interactive) CommitTemplate
mbp at canonical.com
Mon Jul 31 10:01:07 BST 2006
On 28 Jul 2006, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> > (**) What I would like to see someday is `bzr commit --select-hunks`,
> > a-la-darcs. Kinda like shelve-commit-unshelve. Do you think it'd
> > be accepted if some day... an implementation appeared?
> commit --select-hunks is a way of committing untested code, and there is
> some sentiment against doing that. Putting it in the mainline might
> give the impression that we thought it was a good idea.
I think committing untested code is generally a bad idea, but I don't
think we should try to stop people doing it they really want to. Anyhow
they can already commit selected files, so it's only a matter of degree.
darcs (I think) has a pretty clever way to handle this: when the commit
is prepared, it builds a temporary directory containing a copy of the
tree just as it will be committed, and runs a test command in there.
(That is to say, the temporary directory is guaranteed to be the same as
if you did the commit and then exported the resulting revision.) This
should give good protection against selective commits.
More information about the bazaar