Re: [PATCH v2 10/11] builtin rebase: only store fully-qualified refs in `options.head_name`
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Sep 10, 2018, 20:25 UTC
- Message-ID
- <20180910202527.GC17224@localhost>
- In-Reply-To
- <xmqqva7dthq5.fsf@gitster-ct.c.googlers.com>
On Mon, Sep 10, 2018 at 09:55:30AM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> SZEDER Gábor <szeder.dev@gmail.com> 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.