libgit2/libgit2sharp — pull request #494 by dahlbyk (2013-08-17 04:06:20+00:00)
Title: RewriteHistory: PruneEmptyCommits

As promised, support for `--prune-empty` (or something like it).

I didn't actually replicate these tests with `git filter-branch`, but the resulting commit graphs in each case seem reasonable. I should probably check how `filter-branch` handles cases where a ref can't reasonably be rewritten (see https://github.com/dahlbyk/libgit2sharp/blob/66777c927990ff9dad0fb42ce0dc67c23ccc2e90/LibGit2Sharp.Tests/FilterBranchFixture.cs#L156-162), though I can't think of anything reasonable to do other than remove it - anyone already know, or have a different idea how to handle it?

I also didn't cover a scenario where all trees are empty...necessary? What should it do?