diff -r e1f0ec0b7d2d -r e40343ce9c4c mercurial/patch.py --- a/mercurial/patch.py Tue Sep 13 22:57:57 2016 -0400 +++ b/mercurial/patch.py Tue Aug 30 15:55:07 2016 -0400 @@ -2144,7 +2144,14 @@ def get(key, name=None, getter=ui.configbool, forceplain=None): if opts: v = opts.get(key) - if v: + # diffopts flags are either None-default (which is passed + # through unchanged, so we can identify unset values), or + # some other falsey default (eg --unified, which defaults + # to an empty string). We only want to override the config + # entries from hgrc with command line values if they + # appear to have been set, which is any truthy value, + # True, or False. + if v or isinstance(v, bool): return v if forceplain is not None and ui.plain(): return forceplain