fast-export and fast-import have nice --import-marks flags which allow
for incremental migrations. However, if there is a mark in
fast-export's file of marks without a corresponding mark in the one for
fast-import, then we run the risk that fast-export tries to send new
objects relative to the mark it knows which fast-import does not,
causing fast-import to fail.
This arises in practice when there is a filter of some sort running
between the fast-export and fast-import processes which prunes some
commits programmatically. Provide such a filter with the ability to
alias pruned commits to their most recent non-pruned ancestor.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Elijah Newren5 years agocommitted byJunio C Hamano
@ -337,6 +337,13 @@ and control the current import process. More detailed discussion
@@ -337,6 +337,13 @@ and control the current import process. More detailed discussion
`commit` command. This command is optional and is not
needed to perform an import.
`alias`::
Record that a mark refers to a given object without first
creating any new object. Using --import-marks and referring
to missing marks will cause fast-import to fail, so aliases
can provide a way to set otherwise pruned commits to a valid
value (e.g. the nearest non-pruned ancestor).
`checkpoint`::
Forces fast-import to close the current packfile, generate its
unique SHA-1 checksum and index, and start a new packfile.
@ -914,6 +921,21 @@ a data chunk which does not have an LF as its last byte.
@@ -914,6 +921,21 @@ a data chunk which does not have an LF as its last byte.
+
The `LF` after `<delim> LF` is optional (it used to be required).
`alias`
~~~~~~~
Record that a mark refers to a given object without first creating any
new object.
....
'alias' LF
mark
'to' SP <commit-ish> LF
LF?
....
For a detailed description of `<commit-ish>` see above under `from`.
`checkpoint`
~~~~~~~~~~~~
Forces fast-import to close the current packfile, start a new one, and to