libgit2/libgit2sharp — pull request #474 by dahlbyk (2013-07-22 23:03:53+00:00)
Title: RFC: RewriteHistory API Change

I stumbled on b7d3e6e as a scenario we probably want to support a while ago, but was undecided on the best way to solve the problem from an API evolution standpoint. The challenge with `RewriteHistory()` leaning heavily on optional parameters is that it can't easily be changed while keeping the old version as obsolete. In this case, I think it's useful (necessary?) to have access to the full commit when rewriting parents.

For now I've implemented a simple parameter object with delegate properties aligning with what existed before.

I wonder, though, what the future of this API looks like. In particular, simplifying composition of common filters (`--subdirectory-filter`, `--prune-empty`, etc) so the wheel doesn't have to be reinvented each time seems like a good feature to support. I have a few ideas for a more robust `RewriteVisitor` implementation with support for composition, but before I spend time on it I thought I'd see if there's any interest or other ideas.