问题
Is there a way to configure Mercurial to allow for empty commit messages? If you try hg commit
through the CLI without entering a commit message, the commit is canceled with: abort: empty commit message
.
Now, I know that committing without a message is usually considered bad form, but does Mercurial allow it at all?
回答1:
You can use just a space, but I'd really discourage it:
hg commit -m " "
回答2:
If the problem is that you don't want to enter the -m "blah" part you can always set up an alias. e.g. in hgrc
[alias]
qcommit = commit -m "quick commit - no message"
If you don't like qcommit then you can alias to commit instead i.e.
[alias]
commit = commit -m "quick commit - no message"
this won't help you with TortoiseHG however which presumebly validates its entry fields before passing data to mercurial iteslf
来源:https://stackoverflow.com/questions/3343424/does-mercurial-support-empty-commit-messages