Re: [PATCH v2 05/12] fast-export: handle overridden main branch names correctly
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 23, 2020, 19:22 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2006232120221.54@tvgsbejvaqbjf.bet>
- In-Reply-To
- <xmqqmu54w91n.fsf@gitster.c.googlers.com>
Hi Junio,
On Mon, 15 Jun 2020, Junio C Hamano wrote:
Show 23 quoted lines
> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> > writes: > > > + * While the main branch name might often be `main` for new > > + * repositories (and `master` for aged ones), and such well-known names > > As I said, if you used a different word for the first 'main' in the > sentence, it reads much better. > > > + * may not necessarily need anonymizing, it could be configured to use > > + * a secret word that the user may not want to reveal. > > */ > > - if (!strcmp(refname, "refs/heads/master")) > > + if (!main_branch) > > + main_branch = git_main_branch_name(MAIN_BRANCH_FULL_NAME); > > + > > + if (!strcmp(refname, main_branch)) > > return "refs/heads/ref0"; > > The same comment as 02/12 applies here. If the helper function > returns "" when the user says that no branch is more special than > others in the repository, the code would automatically do the right > thing.
Seeing as the `fast-export` patches in this here patch series will be dropped from v3, in favor of Peff's patches, this does no longer need to be addressed.
> In any case, thanks for working on it. I am on "vacation" so will > be commenting on the rest of the series later in the week.
Welcome back! I hope you were able to rest.
Ciao, Dscho