Thread (3 messages) flat view 3 messages, 3 authors, 2016-11-02

Re: [ANNOUNCE] Git v2.11.0-rc0

From: Stefan Beller <hidden>
Date: 2016-11-01 21:41:42

Possibly related (same subject, not in this thread)

On Tue, Nov 1, 2016 at 2:38 PM, Junio C Hamano [off-list ref] wrote:

-diff.indentHeuristic::
 diff.compactionHeuristic::
        Set one of these options to `true` to enable one of two
        experimental heuristics that shift diff hunk boundaries to
We would need to reword this as well, as there will be only one heuristic left?

quoted hunk ↗ jump to hunk
--- a/xdiff/xdiffi.c
+++ b/xdiff/xdiffi.c
@@ -906,22 +906,7 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
                                if (group_previous(xdfo, &go))
                                        xdl_bug("group sync broken sliding to match");
                        }
-               } else if ((flags & XDF_COMPACTION_HEURISTIC) && blank_lines) {
-                       /*
-                        * Compaction heuristic: if it is possible to shift the
-                        * group to make its bottom line a blank line, do so.
-                        *
-                        * As we already shifted the group forward as far as
-                        * possible in the earlier loop, we only need to handle
-                        * backward shifts, not forward ones.
-                        */
-                       while (!is_blank_line(xdf->recs[g.end - 1], flags)) {
-                               if (group_slide_up(xdf, &g, flags))
-                                       xdl_bug("blank line disappeared");
-                               if (group_previous(xdfo, &go))
-                                       xdl_bug("group sync broken sliding to blank line");
-                       }
-               } else if (flags & XDF_INDENT_HEURISTIC) {
+               } else if (flags & XDF_COMPACTION_HEURISTIC) {
                        /*
                         * Indent heuristic: a group of pure add/delete lines
This comment may need adjustment as well (though we could go without)
                         * implies two splits, one between the end of the "before"
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help