summaryrefslogtreecommitdiffstats
path: root/git-fast-import.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-04-25 19:12:27 +0900
committerJunio C Hamano <gitster@pobox.com>2019-04-25 19:12:27 +0900
commit2ba14716c3b8d8081480683846aefbc1d2abe0db (patch)
tree26796b7b6c67263fc7a895282813fba914033b2c /git-fast-import.html
parentb551377cb5b53a9d5872eeaa46cd5b3a0a661435 (diff)
downloadgit-htmldocs-2ba14716c3b8d8081480683846aefbc1d2abe0db.tar.gz
Autogenerated HTML docs for v2.21.0-777-g83232e
Diffstat (limited to 'git-fast-import.html')
-rw-r--r--git-fast-import.html30
1 files changed, 20 insertions, 10 deletions
diff --git a/git-fast-import.html b/git-fast-import.html
index 99ed517b4..0bcc60164 100644
--- a/git-fast-import.html
+++ b/git-fast-import.html
@@ -1315,7 +1315,12 @@ creating the commit. These commands may be supplied in any order.
However it is recommended that a <code>filedeleteall</code> command precede
all <code>filemodify</code>, <code>filecopy</code>, <code>filerename</code> and <code>notemodify</code> commands in
the same commit, as <code>filedeleteall</code> wipes the branch clean (see below).</p></div>
-<div class="paragraph"><p>The <code>LF</code> after the command is optional (it used to be required).</p></div>
+<div class="paragraph"><p>The <code>LF</code> after the command is optional (it used to be required). Note
+that for reasons of backward compatibility, if the commit ends with a
+<code>data</code> command (i.e. it has has no <code>from</code>, <code>merge</code>, <code>filemodify</code>,
+<code>filedelete</code>, <code>filecopy</code>, <code>filerename</code>, <code>filedeleteall</code> or
+<code>notemodify</code> commands) then two <code>LF</code> commands may appear at the end of
+the command instead of just one.</p></div>
<div class="sect3">
<h4 id="_code_author_code"><code>author</code></h4>
<div class="paragraph"><p>An <code>author</code> command may optionally appear, if the author information
@@ -1901,9 +1906,6 @@ might want to refer to in their commit messages.</p></div>
<div class="content">
<pre><code> 'get-mark' SP ':' &lt;idnum&gt; LF</code></pre>
</div></div>
-<div class="paragraph"><p>This command can be used anywhere in the stream that comments are
-accepted. In particular, the <code>get-mark</code> command can be used in the
-middle of a commit but not in the middle of a <code>data</code> command.</p></div>
<div class="paragraph"><p>See &#8220;Responses To Commands&#8221; below for details about how to read
this output safely.</p></div>
</div>
@@ -1930,9 +1932,10 @@ ready to be written.</p></div>
&lt;contents&gt; LF</code></pre>
</div></div>
</div></div>
-<div class="paragraph"><p>This command can be used anywhere in the stream that comments are
-accepted. In particular, the <code>cat-blob</code> command can be used in the
-middle of a commit but not in the middle of a <code>data</code> command.</p></div>
+<div class="paragraph"><p>This command can be used where a <code>filemodify</code> directive can appear,
+allowing it to be used in the middle of a commit. For a <code>filemodify</code>
+using an inline directive, it can also appear right before the <code>data</code>
+directive.</p></div>
<div class="paragraph"><p>See &#8220;Responses To Commands&#8221; below for details about how to read
this output safely.</p></div>
</div>
@@ -1943,8 +1946,8 @@ previously arranged with the <code>--cat-blob-fd</code> argument. This allows
printing a blob from the active commit (with <code>cat-blob</code>) or copying a
blob or tree from a previous commit for use in the current one (with
<code>filemodify</code>).</p></div>
-<div class="paragraph"><p>The <code>ls</code> command can be used anywhere in the stream that comments are
-accepted, including the middle of a commit.</p></div>
+<div class="paragraph"><p>The <code>ls</code> command can also be used where a <code>filemodify</code> directive can
+appear, allowing it to be used in the middle of a commit.</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
Reading from the active commit
@@ -2409,6 +2412,13 @@ Git to reorganize the packfiles for faster data access. If blob
deltas are suboptimal (see above) then also adding the <code>-f</code> option
to force recomputation of all deltas can significantly reduce the
final packfile size (30-50% smaller can be quite typical).</p></div>
+<div class="paragraph"><p>Instead of running <code>git repack</code> you can also run <code>git gc
+--aggressive</code>, which will also optimize other things after an import
+(e.g. pack loose refs). As noted in the "AGGRESSIVE" section in
+<a href="git-gc.html">git-gc(1)</a> the <code>--aggressive</code> option will find new deltas with
+the <code>-f</code> option to <a href="git-repack.html">git-repack(1)</a>. For the reasons elaborated
+on above using <code>--aggressive</code> after a fast-import is one of the few
+cases where it&#8217;s known to be worthwhile.</p></div>
</div>
</div>
<div class="sect1">
@@ -2512,7 +2522,7 @@ compression.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2019-01-05 07:31:36 JST
+ 2019-04-25 19:09:28 JST
</div>
</div>
</body>