Re: [PATCH v2 02/12] fmt-merge-msg: introduce a way to override the main branch name
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 23, 2020, 21:12 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2006232311270.54@tvgsbejvaqbjf.bet>
- In-Reply-To
- <xmqqmu51s88k.fsf@gitster.c.googlers.com>
Hi Junio & Hannes,
On Wed, 17 Jun 2020, Junio C Hamano wrote:
Show 25 quoted lines
> Johannes Sixt <j6t@kdbg.org> writes:
>
> > 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.I concur that this would make for a fine optional feature. Of course, that is an issue that is separate from the goal to make the default branch name used by `git init` configurable, so I will leave that feature to be implemented later (and by somebody else).
Ciao, Dscho