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

2018-09-10 Thread SZEDER Gábor
On Mon, Sep 10, 2018 at 09:55:30AM -0700, Junio C Hamano wrote: > SZEDER Gábor writes: > > >>} else { > >> - options.head_name = xstrdup("detached HEAD"); > >> + free(options.head_name); > >> + options.head_name = NULL; > > > >

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

2018-09-10 Thread Junio C Hamano
SZEDER Gábor 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

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

2018-09-08 Thread SZEDER Gábor
On Tue, Sep 04, 2018 at 02:27:20PM -0700, Pratik Karki via GitGitGadget wrote: > From: Pratik Karki > > When running a rebase on a detached HEAD, we currently store the string > "detached HEAD" in options.head_name. That is a faithful translation of > the shell script version, and we still kind

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

2018-09-04 Thread Pratik Karki via GitGitGadget
From: Pratik Karki When running a rebase on a detached HEAD, we currently store the string "detached HEAD" in options.head_name. That is a faithful translation of the shell script version, and we still kind of need it for the purposes of the scripted backends. It is poor style for C, though,