Thread (5 messages) flat view 5 messages, 4 authors, 2017-12-04

Re: [PATCH v3] diff: support anchoring line(s)

From: Johannes Schindelin <hidden>
Date: 2017-11-30 00:36:48

Hi Jonathan,

On Tue, 28 Nov 2017, Jonathan Tan wrote:
quoted hunk ↗ jump to hunk
@@ -4607,7 +4627,14 @@ int diff_opt_parse(struct diff_options *options,
 		DIFF_XDL_CLR(options, NEED_MINIMAL);
 		options->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK;
 		options->xdl_opts |= value;
+		if (value == XDF_PATIENCE_DIFF)
+			clear_patience_anchors(options);
 		return argcount;
+	} else if (skip_prefix(arg, "--anchored=", &arg)) {
+		options->xdl_opts = DIFF_WITH_ALG(options, PATIENCE_DIFF);
+		ALLOC_GROW(options->anchors, options->anchors_nr + 1,
+			   options->anchors_alloc);
+		options->anchors[options->anchors_nr++] = xstrdup(arg);
I looked and failed to find the code that releases this array after the
diff is done... did I miss anything?

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help