Skip to content

Commit 476998d

Browse files
newrengitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e1fac53 commit 476998d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

t/t3427-rebase-subtree.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ test_expect_success 'setup' '
5959
test_commit files_subtree/master5 &&
6060
6161
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 &&
6366
git commit -m "Empty commit" --allow-empty
6467
'
6568

0 commit comments

Comments
 (0)