Thread (1 message) 1 message, 1 author, 2020-06-10

Re: [PATCH 8/9] fast-export: respect the possibly-overridden default branch name

From: Junio C Hamano <hidden>
Date: 2020-06-10 23:25:59

Matt Rogers [off-list ref] writes:
quoted
-        * 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
I wonder if anything bad happens if we keep *no* refs intact in this
function.  "Since it does not reveal anything interesting" is an
excuse why not munging it may be OK, but it does not explain why we
prefer not munging it actively.

If there is no reason to keep _some_ refs as-is, I agree that it is
perfectly sensible not to have this special case at all.

Thanks.
quoted
-       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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help