mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
diffstat: use ui.plain() instead of ui.interactive()
Previously, a default width of 80 is used for non-interactive sessions. This behaviour was introduced before HGPLAIN was supported.
This commit is contained in:
parent
eb02fcecf2
commit
b9377254d9
@ -1158,7 +1158,9 @@ def diff(ui, repo, *pats, **opts):
|
||||
m = cmdutil.match(repo, pats, opts)
|
||||
it = patch.diff(repo, node1, node2, match=m, opts=diffopts)
|
||||
if stat:
|
||||
width = ui.interactive() and util.termwidth() or 80
|
||||
width = 80
|
||||
if not ui.plain():
|
||||
width = util.termwidth()
|
||||
ui.write(patch.diffstat(util.iterlines(it), width=width,
|
||||
git=diffopts.git))
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user