[PATCH] commit: document the ui.allowemptycommit option
Jordi Gutiérrez Hermoso
jordigh at octave.org
Wed Dec 30 20:16:01 UTC 2015
# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh at octave.org>
# Date 1451506458 18000
# Wed Dec 30 15:14:18 2015 -0500
# Node ID 36b8f8e0a55be1e6ad3356d4b0177712ba62617b
# Parent 23541bdd1610c08af247f9c8719045cf247ce541
commit: document the ui.allowemptycommit option
It may be nice to document the situations in which other commands
create empty commits, but I did not think it was necessary to go into
that much detail.
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1581,6 +1581,10 @@ def commit(ui, repo, *pats, **opts):
commit fails, you will find a backup of your message in
``.hg/last-message.txt``.
+ Empty commits by default are not allowed. You may enable the
+ creation of empty commits via the ``ui.allowemptycommit``
+ configuration option (see :hg:`help config`).
+
The --close-branch flag can be used to mark the current branch
head closed. When all heads of a branch are closed, the branch
will be considered closed and no longer listed.
diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt
--- a/mercurial/help/config.txt
+++ b/mercurial/help/config.txt
@@ -1441,6 +1441,13 @@ user or service running Mercurial.
User interface controls.
+``allowemptycommit``
+ Whether to allow creation of empty commits by the ordinary ``hg
+ commit`` command. An empty commit is a commit that does not modify
+ any files and is not a merge commit. Note that some other commands
+ may still produce empty commits regardless of this setting.
+ (default: False)
+
``archivemeta``
Whether to include the .hg_archival.txt file containing meta data
(hashes for the repository base and for tip) in archives created
More information about the Mercurial-devel
mailing list