mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 15:57:43 +03:00
patch.diffopts: allow a setting to be forced in plain mode
Upcoming patches will add an option that will almost certainly break diff output parsers when enabled. Add support for forcing an option to something in plain mode, as a fallback. Options passed in via the CLI are not affected, though -- it is assumed that any script passing the option in explicitly knows what it is doing.
This commit is contained in:
parent
dabae3afed
commit
ccd6611ec9
@ -1564,6 +1564,8 @@ def diffopts(ui, opts=None, untrusted=False, section='diff'):
|
||||
v = opts.get(key)
|
||||
if v:
|
||||
return v
|
||||
if forceplain is not None and ui.plain():
|
||||
return forceplain
|
||||
return getter(section, name or key, None, untrusted=untrusted)
|
||||
|
||||
return mdiff.diffopts(
|
||||
|
Loading…
Reference in New Issue
Block a user