inform the reader when the <tt>checkpoint</tt> has been completed and it\r
can safely access the refs that fast-import updated.</p>\r
</div>\r
+<h2>Crash Reports</h2>\r
+<div class="sectionbody">\r
+<p>If fast-import is supplied invalid input it will terminate with a\r
+non-zero exit status and create a crash report in the top level of\r
+the Git repository it was importing into. Crash reports contain\r
+a snapshot of the internal fast-import state as well as the most\r
+recent commands that lead up to the crash.</p>\r
+<p>All recent commands (including stream comments, file changes and\r
+progress commands) are shown in the command history within the crash\r
+report, but raw file data and commit messages are excluded from the\r
+crash report. This exclusion saves space within the report file\r
+and reduces the amount of buffering that fast-import must perform\r
+during execution.</p>\r
+<p>After writing a crash report fast-import will close the current\r
+packfile and export the marks table. This allows the frontend\r
+developer to inspect the repository state and resume the import from\r
+the point where it crashed. The modified branches and tags are not\r
+updated during a crash, as the import did not complete successfully.\r
+Branch and tag information can be found in the crash report and\r
+must be applied manually if the update is needed.</p>\r
+<p>An example crash:</p>\r
+<div class="exampleblock">\r
+<div class="exampleblock-content">\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ cat >in <<END_OF_INPUT\r
+# my very first test commit\r
+commit refs/heads/master\r
+committer Shawn O. Pearce <spearce> 19283 -0400\r
+# who is that guy anyway?\r
+data <<EOF\r
+this is my commit\r
+EOF\r
+M 644 inline .gitignore\r
+data <<EOF\r
+.gitignore\r
+EOF\r
+M 777 inline bob\r
+END_OF_INPUT</tt></pre>\r
+</div></div>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ git-fast-import <in\r
+fatal: Corrupt mode: M 777 inline bob\r
+fast-import: dumping crash report to .git/fast_import_crash_8434</tt></pre>\r
+</div></div>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ cat .git/fast_import_crash_8434\r
+fast-import crash report:\r
+ fast-import process: 8434\r
+ parent process : 1391\r
+ at Sat Sep 1 00:58:12 2007</tt></pre>\r
+</div></div>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>fatal: Corrupt mode: M 777 inline bob</tt></pre>\r
+</div></div>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>Most Recent Commands Before Crash\r
+---------------------------------\r
+ # my very first test commit\r
+ commit refs/heads/master\r
+ committer Shawn O. Pearce <spearce> 19283 -0400\r
+ # who is that guy anyway?\r
+ data <<EOF\r
+ M 644 inline .gitignore\r
+ data <<EOF\r
+* M 777 inline bob</tt></pre>\r
+</div></div>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>Active Branch LRU\r
+-----------------\r
+ active_branches = 1 cur, 5 max</tt></pre>\r
+</div></div>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>pos clock name\r
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
+ 1) 0 refs/heads/master</tt></pre>\r
+</div></div>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>Inactive Branches\r
+-----------------\r
+refs/heads/master:\r
+ status : active loaded dirty\r
+ tip commit : 0000000000000000000000000000000000000000\r
+ old tree : 0000000000000000000000000000000000000000\r
+ cur tree : 0000000000000000000000000000000000000000\r
+ commit clock: 0\r
+ last pack :</tt></pre>\r
+</div></div>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>-------------------\r
+END OF CRASH REPORT</tt></pre>\r
+</div></div>\r
+</div></div>\r
+</div>\r
<h2>Tips and Tricks</h2>\r
<div class="sectionbody">\r
<p>The following tips and tricks have been collected from various\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 07-Jan-2008 07:50:18 UTC\r
+Last updated 16-Feb-2008 10:02:22 UTC\r
</div>\r
</div>\r
</body>\r
inform the reader when the `checkpoint` has been completed and it
can safely access the refs that fast-import updated.
+Crash Reports
+-------------
+If fast-import is supplied invalid input it will terminate with a
+non-zero exit status and create a crash report in the top level of
+the Git repository it was importing into. Crash reports contain
+a snapshot of the internal fast-import state as well as the most
+recent commands that lead up to the crash.
+
+All recent commands (including stream comments, file changes and
+progress commands) are shown in the command history within the crash
+report, but raw file data and commit messages are excluded from the
+crash report. This exclusion saves space within the report file
+and reduces the amount of buffering that fast-import must perform
+during execution.
+
+After writing a crash report fast-import will close the current
+packfile and export the marks table. This allows the frontend
+developer to inspect the repository state and resume the import from
+the point where it crashed. The modified branches and tags are not
+updated during a crash, as the import did not complete successfully.
+Branch and tag information can be found in the crash report and
+must be applied manually if the update is needed.
+
+An example crash:
+
+====
+ $ cat >in <<END_OF_INPUT
+ # my very first test commit
+ commit refs/heads/master
+ committer Shawn O. Pearce <spearce> 19283 -0400
+ # who is that guy anyway?
+ data <<EOF
+ this is my commit
+ EOF
+ M 644 inline .gitignore
+ data <<EOF
+ .gitignore
+ EOF
+ M 777 inline bob
+ END_OF_INPUT
+
+ $ git-fast-import <in
+ fatal: Corrupt mode: M 777 inline bob
+ fast-import: dumping crash report to .git/fast_import_crash_8434
+
+ $ cat .git/fast_import_crash_8434
+ fast-import crash report:
+ fast-import process: 8434
+ parent process : 1391
+ at Sat Sep 1 00:58:12 2007
+
+ fatal: Corrupt mode: M 777 inline bob
+
+ Most Recent Commands Before Crash
+ ---------------------------------
+ # my very first test commit
+ commit refs/heads/master
+ committer Shawn O. Pearce <spearce> 19283 -0400
+ # who is that guy anyway?
+ data <<EOF
+ M 644 inline .gitignore
+ data <<EOF
+ * M 777 inline bob
+
+ Active Branch LRU
+ -----------------
+ active_branches = 1 cur, 5 max
+
+ pos clock name
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 1) 0 refs/heads/master
+
+ Inactive Branches
+ -----------------
+ refs/heads/master:
+ status : active loaded dirty
+ tip commit : 0000000000000000000000000000000000000000
+ old tree : 0000000000000000000000000000000000000000
+ cur tree : 0000000000000000000000000000000000000000
+ commit clock: 0
+ last pack :
+
+
+ -------------------
+ END OF CRASH REPORT
+====
+
Tips and Tricks
---------------
The following tips and tricks have been collected from various