libgit2/rugged — pull request #211 by arthurschreiber (2013-05-20 22:48:31+00:00)
Title: Diff changes

This PR fixes some issues in the diff API. Based on work done by @brianmario in the `diff-changes` branch, with changes on top by me.

* `Rugged::Tree#diff` should always take at least one argument. Doing a diff against an empty tree is a very special case and I think that should be highlighted by passing `nil` explicitly. If someone has a different opinion here, I can change it back.
* `Rugged::Commit#diff` should always assume you want to diff against the parent commit's tree (or `nil` in case of an initial commit). It should allow only passing the options hash.

It'd be great if this could be merged soon, as the diff API is unusable without these changes for some cases.