Fix reset for staged deletes
Fix some coverity-found issues
Merge pull request #2286 from libgit2/rb/fix-reset-staged-delete

Fix reset for staged deletes
Merge pull request #2287 from libgit2/rb/moar-coverity-fixes

Fix some issues from the last Coverity scan
Correct git_buf_text_is_binary() to match core-git