2 .\" Title: git-export-filter
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
8 .TH "GIT\-EXPORT\-FILTER" "1" "" "Git" "Git Manual"
9 .\" -----------------------------------------------------------------
10 .\" * set default formatting
11 .\" -----------------------------------------------------------------
12 .\" disable hyphenation
14 .\" disable justification (adjust text to left margin only)
16 .\" -----------------------------------------------------------------
17 .\" * MAIN CONTENT STARTS HERE *
18 .\" -----------------------------------------------------------------
20 git-export-filter \- Filter fast\-export data with optional rewrites
24 \fIgit export\-filter\fR [\-\-verbose|\-v] [\-h|\-\-help] [\-\-version|\-V] [\-\-debug|\-d]
25 [\-\-authors\-file=<authors_file> [\-\-require\-authors]]
26 [\-\-branches\-file=<branches_file>] [\-\-trunk\-is\-master]
27 [\-\-convert\-tagger=<email>] [\-\-strip\-at\-suffix]
28 [\-\-expand\-renames] [\-\-names] [\-\-]
29 [<input_file>] > <output_file>
34 Filters a git fast\-export data stream optionally rewriting author and/or branch names along the way and writes the result to standard output\&.
36 When given no options or arguments, simply copies the input to the output\&. In this case the input is still parsed and invalid fast\-export input data will still be detected even though no rewriting is being performed\&.
41 Show additional information on standard error while processing the data stream\&.
48 is given first show extensive help\&. No conversion is performed if this option is given\&.
53 Show the version information\&. No conversion is performed if this option is given\&.
58 Show debugging information on standard error during the conversion\&.
61 \-\-authors\-file <authors_file>
63 Specifies author/committer names to rewrite\&. See the "REWRITE FILE FORMAT" below for information on
70 May only be specified if
72 is also specified\&. If this option is given, then all author/committer names encountered in the input stream must be found in
74 or an error will occur and the conversion will stop\&. If this option is not given then author/committer names not listed in
79 \-\-branches\-file <branches_file>
81 Specifies branch and/or tag names to rewrite\&. See the "REWRITE FILE FORMAT" below for information on
85 Annotated tag names can be renamed but only if they are located under
87 as the fast\-export file format forces that prefix to be present\&. The
89 prefix must be included in the
91 on both the left and right sides of the
93 in order to successfully rewrite annotated tag names\&.
98 Giving this option converts
103 \-\-trunk\-is\-master
104 option can be given in place of or in addition to the
108 Really this is just intended to be a shortcut to having a
111 refs/heads/trunk=refs/heads/master
115 \-\-convert\-tagger <email>
117 If this option is given, then any annotated tags with a committer that has an email of
119 will be converted to a lightweight tag\&.
121 Some fast\-export producers create tag commands which always use a fixed tagger (typically
122 tagger) with a data length of 0 and a timestamp identical to the commit that is being tagged\&. In other words, a lightweight tag in disguise\&.
126 option can be used to convert these lightweight\-tag\-in\-disguise annotated tags to a real lightweight tags\&.
129 \-\-strip\-at\-suffix
131 If this option is given then when converting author/committer names, if the authors file does not contain an exact match for the email and the email contains an
133 sign then the email is looked up again after stripping everything starting with and including the
135 character from the end\&.
141 suffixes to the email addresses it generates in the fast\-export data and will need this option to use a standard
148 Some importers of fast\-export data cannot handle renames but can handle copies\&. If \-\-expand\-renames is given then any instances of filerename
150 are replaced with a filecopy
152 followed by a filedelete
159 This option may not be combined with any of the others\&. Instead of outputting a modified fast\-import stream, output only the author, committer and tagger names as they are encountered one per line without any timestamp information\&. This can be used to help build an initial authors file\&.
161 Do note that the names are output as\-is from the input stream whereas this utility expects to match only the email portion when given an authors file with the \-\-authors\-file option\&. This means the name, non\-email portion and surrounding
165 characters will have to be removed from the output provided by this option\&. Additionally, of course, duplicate names need to be removed as well\&.
170 The fast\-export stream to read\&. If
172 is omitted, then standard input will be read\&.
174 .SH "REWRITE FILE FORMAT"
176 Syntax is compatible with the \fIgit svn\fR \-\-authors\-file and \fIgit cvsimport\fR \-A files\&. For committer/author rewrites the syntax looks like:
182 email = John Smith <smith@example\&.com>
189 And for branch rewrites it looks like:
195 refs/heads/ALL_CAPS = refs/heads/small_caps
202 Blank lines and lines starting with # are ignored\&.
204 Note that when rewriting author/committer names, only the <email> portion (the part between < and >) of the name is matched, the rest of the name is ignored for matching purposes\&.
207 If the input data is the result of fossil export \-\-git then probably the \-\-trunk\-is\-master and \-\-convert\-tagger tagger options will be needed\&.
210 Kyle J\&. McKay <mackyle@gmail\&.com>
213 Not part of the \fBgit\fR(1) suite yet