Skip to content
Snippets Groups Projects
user avatar
Pierre-Yves David authored
The new way to allow empty commit is to temporarily set the
'ui.allowemptycommit' config option.


  allowemptyback = repo.ui.backupconfig('ui', 'allowemptycommit')
  try:
      repo.ui.setconfig('ui', 'allowemptycommit', True)
      repo.commit(...)
  finally:
      repo.ui.restoreconfig(allowemptyback)

All known uses of force for allowing empty commits have been removed, so let's
remove it from the allowemptycommits condition.
9a74b991
History
Name Last commit Last update