Re: [PATCH 8/9] fast-export: respect the possibly-overridden default branch name
- From
Matt Rogers <mattr94@gmail.com>
- Date
- Jun 10, 2020, 21:54 UTC
- Message-ID
- <CAOjrSZvm9QNUttUNVBEUMPJ8zgYEoAnSPN5_6N5uwpiM1sVrcQ@mail.gmail.com>
- In-Reply-To
- <1efe848f2b029e572cea61cadcfe36b9d3797836.1591823971.git.gitgitgadget@gmail.com>
Show 5 quoted lines
> - * We also leave "master" as a special case, since it does not reveal > - * anything interesting. > + * We also leave the default branch name as a special case, since it > + * does not reveal anything interesting. > */
I feel this is a weird thing to do, since you're trying to anonymize the branch name,and now the default branch is identifiable with your config file. For example, if the default branch contains the name of my project/repo then this sounds like a recipe for accidentally sharing it. I feel a better alternative would be to exclude nothing from the anonymization or the proposed default default branch name
Show 11 quoted lines
> - if (!strcmp(refname, "refs/heads/master")) > + if (!default_branch_name) > + default_branch_name = git_default_branch_name(0); > + > + if (!strcmp(refname, default_branch_name)) > return refname; > > strbuf_reset(&anon); > -- > gitgitgadget >
-- Matthew Rogers