summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2019-10-03 20:27:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-10-03 22:33:21 (GMT)
commitb8f50e5b60e2654fcbf5f72b682635ee2e624923 (patch)
tree2e759859e2b482d9b2927db40232a50bed26b479 /Documentation
parentf73b2aba05788208ccd9b48f350b90cbfe57e1c4 (diff)
downloadgit-b8f50e5b60e2654fcbf5f72b682635ee2e624923.zip
git-b8f50e5b60e2654fcbf5f72b682635ee2e624923.tar.gz
git-b8f50e5b60e2654fcbf5f72b682635ee2e624923.tar.bz2
fast-import: add support for new 'alias' command
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>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-fast-import.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index 4977869..a3f1e0c 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -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.
+
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