git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Tan <jonathantanmy@google.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: gitster@pobox.com, git@vger.kernel.org, sbeller@google.com
Subject: Re: [PATCH v3] diff: support anchoring line(s)
Date: Thu, 30 Nov 2017 15:26:05 -0800	[thread overview]
Message-ID: <20171130152605.1b775e9cc2ddd7f917424448@google.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1.1711300134560.6482@virtualbox>

On Thu, 30 Nov 2017 01:36:37 +0100 (CET)
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

> Hi Jonathan,
> 
> On Tue, 28 Nov 2017, Jonathan Tan wrote:
> 
> > @@ -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?

You didn't miss anything. As far as I can tell, occurrences of struct
diff_options live throughout the lifetime of an invocation of Git and
are not freed. (Even if the struct itself is allocated on the stack, its
pathspec has some elements allocated on the heap.)

  reply	other threads:[~2017-11-30 23:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21 22:17 [RFC PATCH] xdiff/xpatience: support anchoring a line Jonathan Tan
2017-11-21 23:28 ` Stefan Beller
2017-11-22  2:27 ` Junio C Hamano
2017-11-22 23:41 ` [PATCH] xdiff/xpatience: support anchoring line(s) Jonathan Tan
2017-11-23  0:15   ` Stefan Beller
2017-11-23  2:05   ` Junio C Hamano
2017-11-23  2:16     ` Junio C Hamano
2017-11-23  2:47       ` Junio C Hamano
2017-11-27 18:30         ` Jonathan Tan
2017-11-27 19:47   ` [PATCH v2] diff: " Jonathan Tan
2017-11-28  1:38     ` Junio C Hamano
2017-11-28 18:47       ` [PATCH v3] " Jonathan Tan
2017-11-30  0:36         ` Johannes Schindelin
2017-11-30 23:26           ` Jonathan Tan [this message]
2017-12-04 19:45             ` Stefan Beller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171130152605.1b775e9cc2ddd7f917424448@google.com \
    --to=jonathantanmy@google.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).