summaryrefslogtreecommitdiff
path: root/t/t9300-fast-import.sh
diff options
context:
space:
mode:
authorLibravatar Elijah Newren <newren@gmail.com>2019-10-03 13:27:05 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-10-04 07:33:21 +0900
commitb8f50e5b60e2654fcbf5f72b682635ee2e624923 (patch)
tree2e759859e2b482d9b2927db40232a50bed26b479 /t/t9300-fast-import.sh
parentfast-import: allow tags to be identified by mark labels (diff)
downloadtgif-b8f50e5b60e2654fcbf5f72b682635ee2e624923.tar.xz
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 't/t9300-fast-import.sh')
-rwxr-xr-xt/t9300-fast-import.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 3ad2b2f1ba..41f2a1dad9 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -111,6 +111,10 @@ test_expect_success 'A: create pack from stdin' '
Tag of tag of our lovely commit
EOF
+ alias
+ mark :8
+ to :5
+
INPUT_END
git fast-import --export-marks=marks.out <input &&
git whatchanged master
@@ -195,6 +199,7 @@ test_expect_success 'A: verify marks output' '
:5 $(git rev-parse --verify master^0)
:6 $(git cat-file tag nested | grep object | cut -d" " -f 2)
:7 $(git rev-parse --verify nested)
+ :8 $(git rev-parse --verify master^0)
EOF
test_cmp expect marks.out
'