aboutsummaryrefslogtreecommitdiff
path: root/Documentation/git-fast-import.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-12-16 12:58:38 -0800
committerJunio C Hamano <gitster@pobox.com>2010-12-16 12:58:38 -0800
commit914584266c7675d3d0fa18e0eed05742327b22e5 (patch)
treeab6a44bcb8fd8263e0fdbebfd4b722de4a070d91 /Documentation/git-fast-import.txt
parent4bb4d30095fbc3b1689cc656e71f6a51e43fbd69 (diff)
parenta3a6f4c4cdc42a4d432bc51915d3e1d092d8ca9a (diff)
downloadgit-914584266c7675d3d0fa18e0eed05742327b22e5.tar.gz
git-914584266c7675d3d0fa18e0eed05742327b22e5.tar.xz
Merge branch 'jn/fast-import-blob-access'
* jn/fast-import-blob-access: t9300: avoid short reads from dd t9300: remove unnecessary use of /dev/stdin fast-import: Allow cat-blob requests at arbitrary points in stream fast-import: let importers retrieve blobs fast-import: clarify documentation of "feature" command fast-import: stricter parsing of integer options Conflicts: fast-import.c
Diffstat (limited to 'Documentation/git-fast-import.txt')
-rw-r--r--Documentation/git-fast-import.txt82
1 files changed, 62 insertions, 20 deletions
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index 9667e9aeb..f56dfcabb 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -92,6 +92,11 @@ OPTIONS
--(no-)-relative-marks= with the --(import|export)-marks=
options.
+--cat-blob-fd=<fd>::
+ Specify the file descriptor that will be written to
+ when the `cat-blob` command is encountered in the stream.
+ The default behaviour is to write to `stdout`.
+
--export-pack-edges=<file>::
After creating a packfile, print a line of data to
<file> listing the filename of the packfile and the last
@@ -320,6 +325,11 @@ and control the current import process. More detailed discussion
standard output. This command is optional and is not needed
to perform an import.
+`cat-blob`::
+ Causes fast-import to print a blob in 'cat-file --batch'
+ format to the file descriptor set with `--cat-blob-fd` or
+ `stdout` if unspecified.
+
`feature`::
Require that fast-import supports the specified feature, or
abort if it does not.
@@ -879,34 +889,65 @@ Placing a `progress` command immediately after a `checkpoint` will
inform the reader when the `checkpoint` has been completed and it
can safely access the refs that fast-import updated.
-`feature`
-~~~~~~~~~
-Require that fast-import supports the specified feature, or abort if
-it does not.
+`cat-blob`
+~~~~~~~~~~
+Causes fast-import to print a blob to a file descriptor previously
+arranged with the `--cat-blob-fd` argument. The command otherwise
+has no impact on the current import; its main purpose is to
+retrieve blobs that may be in fast-import's memory but not
+accessible from the target repository.
....
- 'feature' SP <feature> LF
+ 'cat-blob' SP <dataref> LF
....
-The <feature> part of the command may be any string matching
-^[a-zA-Z][a-zA-Z-]*$ and should be understood by fast-import.
+The `<dataref>` can be either a mark reference (`:<idnum>`)
+set previously or a full 40-byte SHA-1 of a Git blob, preexisting or
+ready to be written.
-Feature work identical as their option counterparts with the
-exception of the import-marks feature, see below.
+output uses the same format as `git cat-file --batch`:
-The following features are currently supported:
+====
+ <sha1> SP 'blob' SP <size> LF
+ <contents> LF
+====
-* date-format
-* import-marks
-* export-marks
-* relative-marks
-* no-relative-marks
-* force
+This command can be used anywhere in the stream that comments are
+accepted. In particular, the `cat-blob` command can be used in the
+middle of a commit but not in the middle of a `data` command.
+
+`feature`
+~~~~~~~~~
+Require that fast-import supports the specified feature, or abort if
+it does not.
+
+....
+ 'feature' SP <feature> ('=' <argument>)? LF
+....
-The import-marks behaves differently from when it is specified as
-commandline option in that only one "feature import-marks" is allowed
-per stream. Also, any --import-marks= specified on the commandline
-will override those from the stream (if any).
+The <feature> part of the command may be any one of the following:
+
+date-format::
+export-marks::
+relative-marks::
+no-relative-marks::
+force::
+ Act as though the corresponding command-line option with
+ a leading '--' was passed on the command line
+ (see OPTIONS, above).
+
+import-marks::
+ Like --import-marks except in two respects: first, only one
+ "feature import-marks" command is allowed per stream;
+ second, an --import-marks= command-line option overrides
+ any "feature import-marks" command in the stream.
+
+cat-blob::
+ Ignored. Versions of fast-import not supporting the
+ "cat-blob" command will exit with a message indicating so.
+ This lets the import error out early with a clear message,
+ rather than wasting time on the early part of an import
+ before the unsupported command is detected.
`option`
~~~~~~~~
@@ -933,6 +974,7 @@ not be passed as option:
* date-format
* import-marks
* export-marks
+* cat-blob-fd
* force
Crash Reports