Re: [PATCH 09/10] fast-export: allow seeding the anonymized mapping
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jun 23, 2020, 18:11 UTC
- Message-ID
- <CAPig+cQ1EGR6_8NJ+U3MQEseU1yT9k_AwdL8Mg7qZAB8Ev4y3g@mail.gmail.com>
- In-Reply-To
- <20200623152505.GI1435482@coredump.intra.peff.net>
On Tue, Jun 23, 2020 at 11:25 AM Jeff King <peff@peff.net> wrote:
Show 11 quoted lines
> Let's make it possible to seed the anonymization map. This lets users > either: > [...] > Signed-off-by: Jeff King <peff@peff.net> > --- > diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt > @@ -119,6 +119,11 @@ by keeping the marks the same across runs. > +--seed-anonymized=<from>[:<to>]:: > + Convert token `<from>` to `<to>` in the anonymized output. If > + `<to>` is omitted, map `<from>` to itself (i.e., do not > + anonymize it). See the section on `ANONYMIZING` below.
By the way (possible bikeshedding ahead), "seed anonymous" seems overly technical. I wonder if a name such as '--anonymize-to=<from>[:<to>]' might be clearer and easier for people to understand.
In fact, in an earlier email, I asked whether --seed-anonymized should imply --anonymize. Thinking further on this, I wonder if we even need the second option name. It should be possible to overload the existing --anonymize to handle all functions. For instance:
'--anonymize' would anonymize everything
'--anonymize=<from>[:<to>]' would anonymize and map <from> to <to>
So, the example you give in the documentation would become:
git fast-export --all \
--anonymize=foo.c:secret.c \
--anonymize=mybranch >streamOr is that too cryptic?