equal
deleted
inserted
replaced
1557 |
1557 |
1558 class GitDiffRequired(Exception): |
1558 class GitDiffRequired(Exception): |
1559 pass |
1559 pass |
1560 |
1560 |
1561 def diffopts(ui, opts=None, untrusted=False, section='diff'): |
1561 def diffopts(ui, opts=None, untrusted=False, section='diff'): |
1562 def get(key, name=None, getter=ui.configbool): |
1562 def get(key, name=None, getter=ui.configbool, forceplain=None): |
1563 return ((opts and opts.get(key)) or |
1563 if opts: |
1564 getter(section, name or key, None, untrusted=untrusted)) |
1564 v = opts.get(key) |
|
1565 if v: |
|
1566 return v |
|
1567 return getter(section, name or key, None, untrusted=untrusted) |
|
1568 |
1565 return mdiff.diffopts( |
1569 return mdiff.diffopts( |
1566 text=opts and opts.get('text'), |
1570 text=opts and opts.get('text'), |
1567 git=get('git'), |
1571 git=get('git'), |
1568 nodates=get('nodates'), |
1572 nodates=get('nodates'), |
1569 nobinary=get('nobinary'), |
1573 nobinary=get('nobinary'), |