Re: [PATCH v2 02/12] fmt-merge-msg: introduce a way to override the main branch name
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 17, 2020, 21:16 UTC
- Message-ID
- <xmqqmu51s88k.fsf@gitster.c.googlers.com>
- In-Reply-To
- <1612660e-aa49-5d7f-d47e-34740e330eaa@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
Show 17 quoted lines
> Am 15.06.20 um 14:50 schrieb Johannes Schindelin via GitGitGadget:
>> @@ -451,10 +451,12 @@ static void fmt_merge_msg_title(struct strbuf *out,
>> strbuf_addf(out, " of %s", srcs.items[i].string);
>> }
>>
>> - if (!strcmp("master", current_branch))
>> + main_branch = git_main_branch_name();
>> + if (!strcmp(main_branch, current_branch))
>> strbuf_addch(out, '\n');
>> else
>> strbuf_addf(out, " into %s\n", current_branch);
>> + free(main_branch);
>> }
>
> Now that the removal of this special case is on the plate, I would
> prefer that the phrase "into foo" is never appended instead of always
> appended.I do not mind such an optional feature. I always find it useful whenever I read "git log --oneline --first-parent master..pu" (of course I have an alias for that) to see which topics are already in my private "to be used in real life" edition, so I would oppose to an unconditional removal, though.