libgit2/libgit2 — pull request #1591 by arrbee (2013-05-16 18:07:09+00:00)
Title: Ensure reuc vector is always valid

In theory, if there was a problem reading the REUC data, the `read_reuc()` routine could have left uninitialized and invalid data in the `git_index` vector. This moves the line that inserts a new entry into the vector down to the bottom of the routine so we know all the content is already valid. Also, per @linquize, this uses `calloc` to ensure no uninitialized data.