diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-07-06 22:35:57 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-07-06 22:35:57 -0700 |
commit | a89117826695bd15a06ab893f088622d58d49b0f (patch) | |
tree | 70a28e4da17998aca0ba3e65532c146377dc655b /git-fast-export.txt | |
parent | cb66540f7a8e62233e4f403871e927e8de01bb3f (diff) | |
download | git-htmldocs-a89117826695bd15a06ab893f088622d58d49b0f.tar.gz |
Autogenerated HTML docs for v2.27.0-343-g4a0fcf
Diffstat (limited to 'git-fast-export.txt')
-rw-r--r-- | git-fast-export.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/git-fast-export.txt b/git-fast-export.txt index e8950de3b..1978dbdc6 100644 --- a/git-fast-export.txt +++ b/git-fast-export.txt @@ -119,6 +119,11 @@ by keeping the marks the same across runs. the shape of the history and stored tree. See the section on `ANONYMIZING` below. +--anonymize-map=<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. + --reference-excluded-parents:: By default, running a command such as `git fast-export master~5..master` will not include the commit master{tilde}5 @@ -238,6 +243,30 @@ collapse "User 0", "User 1", etc into "User X"). This produces a much smaller output, and it is usually easy to quickly confirm that there is no private data in the stream. +Reproducing some bugs may require referencing particular commits or +paths, which becomes challenging after refnames and paths have been +anonymized. You can ask for a particular token to be left as-is or +mapped to a new value. For example, if you have a bug which reproduces +with `git rev-list sensitive -- secret.c`, you can run: + +--------------------------------------------------- +$ git fast-export --anonymize --all \ + --anonymize-map=sensitive:foo \ + --anonymize-map=secret.c:bar.c \ + >stream +--------------------------------------------------- + +After importing the stream, you can then run `git rev-list foo -- bar.c` +in the anonymized repository. + +Note that paths and refnames are split into tokens at slash boundaries. +The command above would anonymize `subdir/secret.c` as something like +`path123/bar.c`; you could then search for `bar.c` in the anonymized +repository to determine the final pathname. + +To make referencing the final pathname simpler, you can map each path +component; so if you also anonymize `subdir` to `publicdir`, then the +final pathname would be `publicdir/bar.c`. LIMITATIONS ----------- |