Page MenuHomePhabricator

final class ArcanistDiffUtils
libphutil Technical Documentation ()

Dumping ground for diff- and diff-algorithm-related miscellany.

Methods

public static function isHeuristicBinaryFile($data)

Make a best-effort attempt to determine if a file is definitely binary.

Parameters
$data
Return
boolIf true, the file is almost certainly binary. If false, the file might still be binary but is subtle about it.

public static function renderDifferences($old, $new, $context_lines, $diff_options)

This method is not documented.
Parameters
$old
$new
$context_lines
$diff_options
Return
wild

public static function generateIntralineDiff($o, $n)

This method is not documented.
Parameters
$o
$n
Return
wild

private static function collapseIntralineRuns($runs)

This method is not documented.
Parameters
$runs
Return
wild

public static function generateEditString($ov, $nv, $max)

This method is not documented.
Parameters
array$ov
array$nv
$max
Return
wild

private static function computeIntralineEdits($o, $n, $max_glyphs)

This method is not documented.
Parameters
$o
$n
$max_glyphs
Return
wild