diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -2584,6 +2584,17 @@ def trydiff(repo, revs, ctx1, ctx2, modi elif revs and not repo.ui.quiet: header.append(diffline(path1, revs)) + # fctx.is | diffopts | what to | is fctx.data() + # binary() | text nobinary git index | output? | outputted? + # ------------------------------------|---------------------------- + # yes | no no no * | summary | no + # yes | no no yes * | base85 | yes + # yes | no yes no * | summary | no + # yes | no yes yes 0 | summary | no + # yes | no yes yes >0 | summary | semi [1] + # yes | yes * * * | text diff | yes + # no | * * * * | text diff | yes + # [1]: hash(fctx.data()) is outputted. so fctx.data() cannot be faked if binary and opts.git and not opts.nobinary and not opts.text: text = mdiff.b85diff(content1, content2) if text: