From: Karthik Nayak Date: Tue, 10 Nov 2026 11:49:57 GMT Subject: [PATCH 12/20] t9300: make the pack edges test self-contained Message-ID: <20261110-kn-fast-import-tests-1-v1-12-dbd9ee502aae@gmail.com> In-Reply-To: <20261110-kn-fast-import-tests-1-v1-0-dbd9ee502aae@gmail.com> Similar to the previous commits, modify the pack-edges tests to make them independent of state from previous tests. Fold 'I: verify edge list' into the test creating the edge list, as it can't run on its own. Pack edges are only recorded for packs which are kept, so set 'fastimport.unpackLimit' to 0 for the import. Create the repository with 'git init -b main', as the import builds on 'main' and t9302, where this test ends up, doesn't set 'GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME'. Signed-off-by: Karthik Nayak --- t/t9300-fast-import.sh | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 5b0101700d..f55604bb87 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -1030,25 +1030,32 @@ test_expect_success 'H: verify file' ' ### test_expect_success 'I: export-pack-edges' ' - cat >input <<-INPUT_END && - commit refs/heads/export-boundary - committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE - data <input <<-INPUT_END && + commit refs/heads/export-boundary + committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE + data <expect <<-EOF && - .git/objects/pack/pack-.pack: $(git rev-parse --verify export-boundary) - EOF - sed -e s/pack-.*pack/pack-.pack/ edges.list >actual && - test_cmp expect actual + INPUT_END + git -c fastimport.unpackLimit=0 fast-import \ + --export-pack-edges=edges.list expect <<-EOF && + .git/objects/pack/pack-.pack: $(git rev-parse --verify export-boundary) + EOF + sed -e s/pack-.*pack/pack-.pack/ edges.list >actual && + test_cmp expect actual + ) ' ### -- 2.56.GIT