[PATCHv5 0/2] xdiff: implement empty line chunk heuristic
- From
Stefan Beller <sbeller@google.com>
- Date
- Apr 19, 2016, 15:21 UTC
- Message-ID
- <1461079290-6523-1-git-send-email-sbeller@google.com>
Thanks Jeff for pointing out issues in the comment!
Thanks, Stefan
diff to origin/jk/diff-compact-heuristic:
diff --git a/xdiff/xdiffi.c b/xdiff/xdiffi.c index 5a02b15..b3c6848 100644 --- a/xdiff/xdiffi.c +++ b/xdiff/xdiffi.c @@ -515,12 +515,12 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) { } /* - * If a group can be moved back and forth, see if there is an + * If a group can be moved back and forth, see if there is a * blank line in the moving space. If there is a blank line, * make sure the last blank line is the end of the group. * - * As we shifted the group forward as far as possible, we only - * need to shift it back if at all. + * As we already shifted the group forward as far as possible + * in the earlier loop, we need to shift it back only if at all. */ if ((flags & XDF_COMPACTION_HEURISTIC) && blank_lines) { while (ixs > 0 && Jacob Keller (1): xdiff: add recs_match helper function Stefan Beller (1): xdiff: implement empty line chunk heuristic Documentation/diff-config.txt | 5 +++++ Documentation/diff-options.txt | 6 ++++++ diff.c | 11 +++++++++++ xdiff/xdiff.h | 2 ++ xdiff/xdiffi.c | 40 ++++++++++++++++++++++++++++++++++++---- 5 files changed, 60 insertions(+), 4 deletions(-)
-- 2.4.11.2.g96ed4e5.dirty