Re: Re* [PATCH 8/9] fast-export: respect the possibly-overridden default branch name
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 12, 2020, 12:53 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2006121451100.56@tvgsbejvaqbjf.bet>
- In-Reply-To
- <xmqqpna5bq2l.fsf_-_@gitster.c.googlers.com>
Hi Junio,
On Thu, 11 Jun 2020, Junio C Hamano wrote:
Show 10 quoted lines
> diff --git a/builtin/fast-export.c b/builtin/fast-export.c > index 85868162ee..a306a60d25 100644 > --- a/builtin/fast-export.c > +++ b/builtin/fast-export.c > @@ -522,7 +522,7 @@ static const char *anonymize_refname(const char *refname) > * anything interesting. > */ > if (!strcmp(refname, "refs/heads/master")) > - return refname; > + return "ref0";
I just realized that the comment above reads:
/*
* We also leave "master" as a special case, since it does not reveal
* anything interesting.
*/Obviously, we need to change that comment here because we do not leave the name unchanged. How about this?
/*
* We special-case the main branch, anonymizing it to `ref0`.
*/Ciao, Dscho
>
> strbuf_reset(&anon);
> for (i = 0; i < ARRAY_SIZE(prefixes); i++) {
>