Does Mercurial support empty commit messages?

后端 未结 2 1988
傲寒
傲寒 2020-12-31 03:45

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

相关标签:
2条回答
  • 2020-12-31 04:32

    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

    0 讨论(0)
  • 2020-12-31 04:36

    You can use just a space, but I'd really discourage it:

    hg commit -m " "
    
    0 讨论(0)
提交回复
热议问题