summaryrefslogtreecommitdiff
path: root/t/t9350-fast-export.sh
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2019-10-03 20:27:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-10-03 22:33:21 (GMT)
commit208d69246ed2a7f66dd8357771eb7afe83e80a43 (patch)
tree3179288448b21758948f71088bf78a45283f6493 /t/t9350-fast-export.sh
parentb8f50e5b60e2654fcbf5f72b682635ee2e624923 (diff)
downloadgit-208d69246ed2a7f66dd8357771eb7afe83e80a43.zip
git-208d69246ed2a7f66dd8357771eb7afe83e80a43.tar.gz
git-208d69246ed2a7f66dd8357771eb7afe83e80a43.tar.bz2
fast-export: add support for --import-marks-if-exists
fast-import has support for both an --import-marks flag and an --import-marks-if-exists flag; the latter of which will not die() if the file does not exist. fast-export only had support for an --import-marks flag; add an --import-marks-if-exists flag for consistency. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9350-fast-export.sh')
-rwxr-xr-xt/t9350-fast-export.sh10
1 files changed, 4 insertions, 6 deletions
diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh
index d32ff41..ea84e2f 100755
--- a/t/t9350-fast-export.sh
+++ b/t/t9350-fast-export.sh
@@ -580,17 +580,15 @@ test_expect_success 'fast-export quotes pathnames' '
'
test_expect_success 'test bidirectionality' '
- >marks-cur &&
- >marks-new &&
git init marks-test &&
- git fast-export --export-marks=marks-cur --import-marks=marks-cur --branches | \
- git --git-dir=marks-test/.git fast-import --export-marks=marks-new --import-marks=marks-new &&
+ git fast-export --export-marks=marks-cur --import-marks-if-exists=marks-cur --branches | \
+ git --git-dir=marks-test/.git fast-import --export-marks=marks-new --import-marks-if-exists=marks-new &&
(cd marks-test &&
git reset --hard &&
echo Wohlauf > file &&
git commit -a -m "back in time") &&
- git --git-dir=marks-test/.git fast-export --export-marks=marks-new --import-marks=marks-new --branches | \
- git fast-import --export-marks=marks-cur --import-marks=marks-cur
+ git --git-dir=marks-test/.git fast-export --export-marks=marks-new --import-marks-if-exists=marks-new --branches | \
+ git fast-import --export-marks=marks-cur --import-marks-if-exists=marks-cur
'
cat > expected << EOF