Merge pull request #2975 from git-up/diff_index_retain Avoid retaining / releasing the index more than necessary when GIT_DIFF_...