mercurial/hook.py
branchstable
changeset 46493 b910be772eb9
parent 46492 7289eac777ec
child 46819 d4ba4d51f85f
--- a/mercurial/hook.py	Wed Feb 10 23:21:21 2021 +0100
+++ b/mercurial/hook.py	Wed Feb 10 23:03:54 2021 +0100
@@ -158,7 +158,10 @@
     env[b'HG_HOOKTYPE'] = htype
     env[b'HG_HOOKNAME'] = name
 
-    plain = ui.configbool(b'hooks', b'%s:run-with-plain' % name)
+    if ui.config(b'hooks', b'%s:run-with-plain' % name) == b'auto':
+        plain = ui.plain()
+    else:
+        plain = ui.configbool(b'hooks', b'%s:run-with-plain' % name)
     if plain:
         env[b'HGPLAIN'] = b'1'
     else: