This file is indexed.

/usr/share/doc/monotone/html/Exporting-to-GIT.html is in monotone-doc 1.0-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<html lang="en">
<head>
<title>Exporting to GIT - monotone documentation</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="monotone documentation">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Advanced-Uses.html#Advanced-Uses" title="Advanced Uses">
<link rel="prev" href="Importing-from-CVS.html#Importing-from-CVS" title="Importing from CVS">
<link rel="next" href="Using-packets.html#Using-packets" title="Using packets">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
<link rel="stylesheet" type="text/css" href="texinfo.css">
</head>
<body>
<div class="node">
<a name="Exporting-to-GIT"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Using-packets.html#Using-packets">Using packets</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Importing-from-CVS.html#Importing-from-CVS">Importing from CVS</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Advanced-Uses.html#Advanced-Uses">Advanced Uses</a>
<hr>
</div>

<h3 class="section">3.17 Exporting to GIT</h3>

<p>Monotone is capable of exporting the contents of a database to
<code>stdout</code> in a form suitable to be piped to git-fast-import(1):

<pre class="smallexample">$ mkdir test.git
$ cd test.git
$ git init
$ mtn --db test.mtn git_export | git fast import
</pre>
<p>While this feature has been tested and verified to some extent with
various &ldquo;real-world&rdquo; monotone databases it is important to realize
that translating from one version control system to another can be a
lossy process. Git represents things somewhat differently than
monotone does and cannot fully represent some things that monotone
can. In particular git does not treat directories as first class
objects as monotone does and does not use certificates to represent
<code>author</code>, <code>date</code>, <code>branch</code> and <code>tag</code> values so
some differences are to be expected.

<p>Git separates the concept of <code>committer</code> from the concept of
<code>author</code> while monotone allows multiple <code>author</code> certs. In
an attempt to represent these different concepts the git exporter uses
the <em>value</em> of the author cert as the git author and the
<em>key</em> used to sign the author cert as the git committer. When
there are multiple author certs the git exporter arbitrarily choses
one of them. The full list of monotone certs may be exported in the
git commit message using the <samp><span class="option">--log-certs</span></samp> option described in
<a href="VCS.html#VCS">VCS</a>.

<p>Monotone author names often look like raw email addresses such as
<code>"user@example.com"</code>. These are not considered valid by git
which requires the display name and leading `&lt;' and trailing `&gt;'
characters around email addresses such as <code>"User Name
&lt;user@example.com&gt;"</code>. The git exporter deals with this difference in
several ways:
     <ul>
<li>revisions that don't have any author certs will default to using
<code>Unknown &lt;unknown&gt;</code> for both the author and committer. 
<li>revisions that have one or more author certs will use the value of one
author cert as the author and the key used to sign this cert as
the committer. 
<li>both author and committer will be looked up in the file specified by
the <samp><span class="option">--authors-file</span></samp> option described in <a href="VCS.html#VCS">VCS</a> and
translated to the specified value if found. 
<li>any author or committer value not found in the authors file will be
processed by the <code>unmapped_git_author</code> hook which may adjust the
value so that it represents a valid value. 
</ul>
All git author and committer values will be validated by the
<code>validate_git_author</code> hook before being written to the output
stream. The export will abort if any author or committer value is
rejected by the validation hook.

<p>Branch names used by monotone are allowed to contain characters that
are not considered valid by git. These may be mapped to other names
using the <samp><span class="option">--branches-file</span></samp> option described in <a href="VCS.html#VCS">VCS</a>

<p>A monotone revision may have multiple <code>changelog</code> certs and
multiple <code>comment</code> certs. The git exporter deals with these by
first concatenating all of the changelog certs followed by all of the
comment certs into one message to use as the git commit
message. Duplicate changelog or comment cert messages that may exist
due to automated merges are removed.

<p>Exporting a database may be a time consuming and involved process,
depending on the size and nature of the database. A 200MB database
should export in less than an hour but may take several hours or
longer depending on factors such as hardware, revision sizes, roster
sizes and many others. The monotone process exporting such a database
should require less than 200MB of RAM but may require
<em>considerably</em> more in some cases. If the exported file is
written to disk it will likely be <em>substantially</em> larger than the
associated database, perhaps between 400MB to 4GB in size.

<p>Anyone using the git exporter must take full responsibility for
verifying that the exported repository matches their expectations and
requirements.

</body></html>