Re: [PATCH v2 01/12] fast-export: do anonymize the primary branch name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 15, 2020 at 12:50:05PM +0000, Junio C Hamano via GitGitGadget wrote:

> There is a comment that explains why it is OK to leave 'master'
> unanonymized (because everybody calls the primary branch 'master'
> and it is no secret), but that does not justify why it is bad to
> anonymize 'master' and make it indistinguishable from other
> branches.  Assuming there _is_ a need to allow the readers of the
> output to tell where the tip of the primary branch is, let's keep
> the special casing of 'master', but still anonymize it to "ref0".
> Because all other branches will be given ref+N where N is a positive
> integer, this will keep the primary branch identifiable in the
> output stream, without exposing what the name of the primary branch
> is in the repository the export stream was taken from.

I think this is fine. The reason I left "master" as-is in the original
is that it is potentially helpful to have an idea of its specialness
when reproducing a traversal in the anonymized. I.e., if you know that a
bug is shown by "git rev-list master~17..master~3", then you can
reproduce it with the same command in the anonymized repo. Losing any
idea of where the primary branch is would make that impossible. But with
this patch, you can swap it out for "ref0~17", etc, which is OK.

Of course that only helps you for _one_ branch. A more generally useful
mechanism would be to teach fast-export to write the ref mapping (and
perhaps file mappings, etc) to a separate file. Then you could convert
any reproduction recipe to use the anonymized names, and share only that
recipe along with the anonymized dump. But that's _way_ outside the
scope of your series. This seems like a good interim step to retain the
status quo.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux