t3427: accelerate this test by using fast-export and fast-import

fast-export and fast-import can easily handle the simple rewrite that was being done by filter-branch, and should be faster on systems with a slow fork. Measuring the overall time taken for all of t3427 (not just the difference between filter-branch and fast-export/fast-import) shows a speedup of about 5% on Linux and 11% on Mac. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed Sep 4, 2019 at 14:40 UTC 476998d05bc62b9baaed240da0893ec5d80d676a
1 file changed +4 -1
t/t3427-rebase-subtree.sh
+4 -1
@@ -59,7 +59,10 @@ test_expect_success 'setup' '
59 test_commit files_subtree/master5 &&
60
61 git checkout -b to-rebase &&
62 - git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&
62 + git fast-export --no-data HEAD -- files_subtree/ |
63 + sed -e "s%\([0-9a-f]\{40\} \)files_subtree/%\1%" |
64 + git fast-import --force --quiet &&
65 + git reset --hard &&
66 git commit -m "Empty commit" --allow-empty
67 '
68