Merge pull request #2308 from libgit2/rb/diff-update-index-stat-cache Reduce excessive OID calculation for diff and stat