Subject: Re: [PATCH v2 10/11] builtin rebase: only store fully-qualified refs in `options.head_name`

From: SZEDER Gábor <[email-masked]>
Date: Mon, 10 Sep 2018 22:25:27 +0200

On Mon, Sep 10, 2018 at 09:55:30AM -0700, Junio C Hamano wrote:
> SZEDER Gábor <[email-masked]> writes:
> 
> >>  		} else {
> >> -			options.head_name = xstrdup("detached HEAD");
> >> +			free(options.head_name);
> >> +			options.head_name = NULL;
> >
> > Please use FREE_AND_NULL(options.head_name) here.
> 
> Good; did contrib/coccinelle/free.cocci catch this?

Yes.

But now that you mention it, I see that it didn't catch it in 'pu' or
in most of the later 'pk/rebase-in-c-X-...' branches, even though they
all have these lines.  It bisects to 0073df2bd3 (builtin rebase:
support --rebase-merges[=[no-]rebase-cousins], 2018-09-04), which
doesn't touch these lines at all.

Strange; I have no idea what's going on.