Re: [PATCH v2 10/11] builtin rebase: only store fully-qualified refs in `options.head_name`
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 10, 2018, 16:55 UTC
- Message-ID
- <xmqqva7dthq5.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180908085207.GB10370@localhost>
SZEDER Gábor <szeder.dev@gmail.com> writes:
Show 6 quoted lines
>> } 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?
Show 7 quoted lines
>
>> branch_name = "HEAD";
>> }
>> if (get_oid("HEAD", &options.orig_head))
>> --
>> gitgitgadget
>>