Add two extra tests for git rebase
[gitweb.git] / t / t7003-filter-branch.sh
index 6a9936e5c45a973f2fd64a2fe20463497f9564eb..cb0474336d66302d9c7cf003bcdeadacb789aa8a 100755 (executable)
@@ -264,4 +264,12 @@ test_expect_success 'Tag name filtering allows slashes in tag names' '
        test_cmp expect actual
 '
 
+test_expect_success 'Prune empty commits' '
+       git rev-list HEAD > expect &&
+       make_commit to_remove &&
+       git filter-branch -f --index-filter "git update-index --remove to_remove" --prune-empty HEAD &&
+       git rev-list HEAD > actual &&
+       test_cmp expect actual
+'
+
 test_done