@@ -54,7 +54,7 @@ Options for Frontends
54
54
~~~~~~~~~~~~~~~~~~~~~
55
55
56
56
--cat-blob-fd=<fd>::
57
- Write responses to `cat-blob` and `ls` queries to the
57
+ Write responses to `get-mark`, ` cat-blob`, and `ls` queries to the
58
58
file descriptor <fd> instead of `stdout`. Allows `progress`
59
59
output intended for the end-user to be separated from other
60
60
output.
@@ -350,6 +350,11 @@ and control the current import process. More detailed discussion
350
350
unless the `done` feature was requested using the
351
351
`--done` command-line option or `feature done` command.
352
352
353
+ `get-mark`::
354
+ Causes fast-import to print the SHA-1 corresponding to a mark
355
+ to the file descriptor set with `--cat-blob-fd`, or `stdout` if
356
+ unspecified.
357
+
353
358
`cat-blob`::
354
359
Causes fast-import to print a blob in 'cat-file --batch'
355
360
format to the file descriptor set with `--cat-blob-fd` or
@@ -930,6 +935,25 @@ Placing a `progress` command immediately after a `checkpoint` will
930
935
inform the reader when the `checkpoint` has been completed and it
931
936
can safely access the refs that fast-import updated.
932
937
938
+ `get-mark`
939
+ ~~~~~~~~~~
940
+ Causes fast-import to print the SHA-1 corresponding to a mark to
941
+ stdout or to the file descriptor previously arranged with the
942
+ `--cat-blob-fd` argument. The command otherwise has no impact on the
943
+ current import; its purpose is to retrieve SHA-1s that later commits
944
+ might want to refer to in their commit messages.
945
+
946
+ ....
947
+ 'get-mark' SP ':' <idnum> LF
948
+ ....
949
+
950
+ This command can be used anywhere in the stream that comments are
951
+ accepted. In particular, the `get-mark` command can be used in the
952
+ middle of a commit but not in the middle of a `data` command.
953
+
954
+ See ``Responses To Commands'' below for details about how to read
955
+ this output safely.
956
+
933
957
`cat-blob`
934
958
~~~~~~~~~~
935
959
Causes fast-import to print a blob to a file descriptor previously
@@ -1000,7 +1024,8 @@ Output uses the same format as `git ls-tree <tree> -- <path>`:
1000
1024
====
1001
1025
1002
1026
The <dataref> represents the blob, tree, or commit object at <path>
1003
- and can be used in later 'cat-blob', 'filemodify', or 'ls' commands.
1027
+ and can be used in later 'get-mark', 'cat-blob', 'filemodify', or
1028
+ 'ls' commands.
1004
1029
1005
1030
If there is no file or subtree at that path, 'git fast-import' will
1006
1031
instead report
@@ -1042,9 +1067,11 @@ import-marks-if-exists::
1042
1067
"feature import-marks-if-exists" like a corresponding
1043
1068
command-line option silently skips a nonexistent file.
1044
1069
1070
+ get-mark::
1045
1071
cat-blob::
1046
1072
ls::
1047
- Require that the backend support the 'cat-blob' or 'ls' command.
1073
+ Require that the backend support the 'get-mark', 'cat-blob',
1074
+ or 'ls' command respectively.
1048
1075
Versions of fast-import not supporting the specified command
1049
1076
will exit with a message indicating so.
1050
1077
This lets the import error out early with a clear message,
@@ -1124,11 +1151,11 @@ bidirectional pipes:
1124
1151
git fast-import >fast-import-output
1125
1152
====
1126
1153
1127
- A frontend set up this way can use `progress`, `ls `, and `cat-blob`
1128
- commands to read information from the import in progress.
1154
+ A frontend set up this way can use `progress`, `get-mark `, `ls`, and
1155
+ `cat-blob` commands to read information from the import in progress.
1129
1156
1130
1157
To avoid deadlock, such frontends must completely consume any
1131
- pending output from `progress`, `ls`, and `cat-blob` before
1158
+ pending output from `progress`, `ls`, `get-mark`, and `cat-blob` before
1132
1159
performing writes to fast-import that might block.
1133
1160
1134
1161
Crash Reports
0 commit comments