libgit2/rugged — pull request #394 by arthurschreiber (2014-07-15 19:21:32+00:00)
Title: Make `Rugged::Diff` reference their repository.

We need to keep a reference from the diff objects to the repository to ensure that the underlying libgit2 data does not get freed accidentally.

Methods like `Rugged::Diff#find_similar!` (which wraps `git_diff_find_similar`) try to access the repository, and will fail if the data was freed.

//cc @carlosmn @mmozuras