--- a/mercurial/patch.py Sat Jan 07 20:47:57 2017 -0800
+++ b/mercurial/patch.py Mon Jan 09 10:51:44 2017 -0800
@@ -2169,6 +2169,11 @@
if git:
buildopts['git'] = get('git')
+ # since this is in the experimental section, we need to call
+ # ui.configbool directory
+ buildopts['showsimilarity'] = ui.configbool('experimental',
+ 'extendedheader.similarity')
+
# need to inspect the ui object instead of using get() since we want to
# test for an int
hconf = ui.config('experimental', 'extendedheader.index')