]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t9350-fast-export.sh
Sync with 2.34.5
[thirdparty/git.git] / t / t9350-fast-export.sh
index 409b48e244224629a11ced5d9cbd99fd81f167ae..63beeb9f620e4814cf96975918bef25f52555491 100755 (executable)
@@ -268,6 +268,7 @@ test_expect_success 'signed-tags=warn-strip' '
 
 test_expect_success 'setup submodule' '
 
+       test_config_global protocol.file.allow always &&
        git checkout -f main &&
        mkdir sub &&
        (
@@ -293,6 +294,7 @@ test_expect_success 'setup submodule' '
 
 test_expect_success 'submodule fast-export | fast-import' '
 
+       test_config_global protocol.file.allow always &&
        SUBENT1=$(git ls-tree main^ sub) &&
        SUBENT2=$(git ls-tree main sub) &&
        rm -rf new &&
@@ -750,4 +752,36 @@ test_expect_success 'merge commit gets exported with --import-marks' '
        )
 '
 
+
+test_expect_success 'fast-export --first-parent outputs all revisions output by revision walk' '
+       git init first-parent &&
+       (
+               cd first-parent &&
+               test_commit A &&
+               git checkout -b topic1 &&
+               test_commit B &&
+               git checkout main &&
+               git merge --no-ff topic1 &&
+
+               git checkout -b topic2 &&
+               test_commit C &&
+               git checkout main &&
+               git merge --no-ff topic2 &&
+
+               test_commit D &&
+
+               git fast-export main -- --first-parent >first-parent-export &&
+               git fast-export main -- --first-parent --reverse >first-parent-reverse-export &&
+               test_cmp first-parent-export first-parent-reverse-export &&
+
+               git init import &&
+               git -C import fast-import <first-parent-export &&
+
+               git log --format="%ad %s" --first-parent main >expected &&
+               git -C import log --format="%ad %s" --all >actual &&
+               test_cmp expected actual &&
+               test_line_count = 4 actual
+       )
+'
+
 test_done