summaryrefslogtreecommitdiffstats
path: root/git-fast-import.html
diff options
context:
space:
mode:
authorJunio C Hamano <junio@hera.kernel.org>2007-07-15 07:19:06 +0000
committerJunio C Hamano <junio@hera.kernel.org>2007-07-15 07:19:06 +0000
commitc0ea7c63de96c9365801e62a878af42131512343 (patch)
treec8207e63f9bd57775b98f322f07c517f0077b3c4 /git-fast-import.html
parent02f130bd23751fc40d2c784821e3f05536363d7c (diff)
downloadgit-htmldocs-c0ea7c63de96c9365801e62a878af42131512343.tar.gz
Autogenerated HTML docs for v1.5.3-rc1-27-ga5e40
Diffstat (limited to 'git-fast-import.html')
-rw-r--r--git-fast-import.html37
1 files changed, 31 insertions, 6 deletions
diff --git a/git-fast-import.html b/git-fast-import.html
index 760cecf21..c537b33e2 100644
--- a/git-fast-import.html
+++ b/git-fast-import.html
@@ -633,7 +633,7 @@ change to the project.</p>
data
('from' SP &lt;committish&gt; LF)?
('merge' SP &lt;committish&gt; LF)?
- (filemodify | filedelete | filerename | filedeleteall)*
+ (filemodify | filedelete | filecopy | filerename | filedeleteall)*
LF</tt></pre>
</div></div>
<p>where <tt>&lt;ref&gt;</tt> is the name of the branch to make the commit on.
@@ -652,13 +652,13 @@ message (see below for <tt>data</tt> command syntax). To import an empty
commit message use a 0 length data. Commit messages are free-form
and are not interpreted by Git. Currently they must be encoded in
UTF-8, as fast-import does not permit other encodings to be specified.</p>
-<p>Zero or more <tt>filemodify</tt>, <tt>filedelete</tt>, <tt>filename</tt> and
-<tt>filedeleteall</tt> commands
+<p>Zero or more <tt>filemodify</tt>, <tt>filedelete</tt>, <tt>filecopy</tt>, <tt>filerename</tt>
+and <tt>filedeleteall</tt> commands
may be included to update the contents of the branch prior to
creating the commit. These commands may be supplied in any order.
However it is recommended that a <tt>filedeleteall</tt> command preceed
-all <tt>filemodify</tt> and <tt>filerename</tt> commands in the same commit, as
-<tt>filedeleteall</tt>
+all <tt>filemodify</tt>, <tt>filecopy</tt> and <tt>filerename</tt> commands in the same
+commit, as <tt>filedeleteall</tt>
wipes the branch clean (see below).</p>
<h4><tt>author</tt></h4>
<p>An <tt>author</tt> command may optionally appear, if the author information
@@ -850,6 +850,23 @@ first non-empty directory or the root is reached.</p>
<p>here <tt>&lt;path&gt;</tt> is the complete path of the file or subdirectory to
be removed from the branch.
See <tt>filemodify</tt> above for a detailed description of <tt>&lt;path&gt;</tt>.</p>
+<h4><tt>filecopy</tt></h4>
+<p>Recursively copies an existing file or subdirectory to a different
+location within the branch. The existing file or directory must
+exist. If the destination exists it will be completely replaced
+by the content copied from the source.</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt> 'C' SP &lt;path&gt; SP &lt;path&gt; LF</tt></pre>
+</div></div>
+<p>here the first <tt>&lt;path&gt;</tt> is the source location and the second
+<tt>&lt;path&gt;</tt> is the destination. See <tt>filemodify</tt> above for a detailed
+description of what <tt>&lt;path&gt;</tt> may look like. To use a source path
+that contains SP the path must be quoted.</p>
+<p>A <tt>filecopy</tt> command takes effect immediately. Once the source
+location has been copied to the destination any future commands
+applied to the source location will not impact the destination of
+the copy.</p>
<h4><tt>filerename</tt></h4>
<p>Renames an existing file or subdirectory to a different location
within the branch. The existing file or directory must exist. If
@@ -866,6 +883,14 @@ that contains SP the path must be quoted.</p>
location has been renamed to the destination any future commands
applied to the source location will create new files there and not
impact the destination of the rename.</p>
+<p>Note that a <tt>filerename</tt> is the same as a <tt>filecopy</tt> followed by a
+<tt>filedelete</tt> of the source location. There is a slight performance
+advantage to using <tt>filerename</tt>, but the advantage is so small
+that it is never worth trying to convert a delete/add pair in
+source material into a rename for fast-import. This <tt>filerename</tt>
+command is provided just to simplify frontends that already have
+rename information and don't want bother with decomposing it into a
+<tt>filecopy</tt> followed by a <tt>filedelete</tt>.</p>
<h4><tt>filedeleteall</tt></h4>
<p>Included in a <tt>commit</tt> command to remove all files (and also all
directories) from the branch. This command resets the internal
@@ -1223,7 +1248,7 @@ memory footprint (less than 2.7 MiB per active branch).</p>
</div>
<div id="footer">
<div id="footer-text">
-Last updated 10-Jul-2007 07:49:19 UTC
+Last updated 15-Jul-2007 07:18:25 UTC
</div>
</div>
</body>