summaryrefslogtreecommitdiff
path: root/t/t4100/t-apply-1.expect
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2020-06-25 15:48:32 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-06-25 14:19:23 -0700
commit65b5d9fae7684a282f48295b645c2f9da77c2736 (patch)
tree3a5c42c4ec2c542d7327403ad712796f91680669 /t/t4100/t-apply-1.expect
parentfast-export: add a "data" callback parameter to anonymize_str() (diff)
downloadtgif-65b5d9fae7684a282f48295b645c2f9da77c2736.tar.xz
fast-export: allow seeding the anonymized mapping
After you anonymize a repository, it can be hard to find which commits correspond between the original and the result, and thus hard to reproduce commands that triggered bugs in the original. Let's make it possible to seed the anonymization map. This lets users either: - mark names to be retained as-is, if they don't consider them secret (in which case their original commands would just work) - map names to new values, which lets them adapt the reproduction recipe to the new names without revealing the originals The implementation is fairly straight-forward. We already store each anonymized token in a hashmap (so that the same token appearing twice is converted to the same result). We can just introduce a new "seed" hashmap which is consulted first. This does make a few more promises to the user about how we'll anonymize things (e.g., token-splitting pathnames). But it's unlikely that we'd want to change those rules, even if the actual anonymization of a single token changes. And it makes things much easier for the user, who can unblind only a directory name without having to specify each path within it. One alternative to this approach would be to anonymize as we see fit, and then dump the whole refname and pathname mappings to a file. This does work, but it's a bit awkward to use (you have to manually dig the items you care about out of the mapping). Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4100/t-apply-1.expect')
0 files changed, 0 insertions, 0 deletions