Code

Merge branch 'gb/gitweb-patch'
[git.git] / t / t7003-filter-branch.sh
index b0a9d7d536314ec842b141c09ba0d6f8b06b6288..8537bf91606282161ab92b6f2f7367c9a3c016fc 100755 (executable)
@@ -262,4 +262,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