Make libgit2 commit faster for normal flow

If there are no unchecked tracked files, we do not need to reset index from HEAD/HEAD~1, which may involve many tree objects to be read from disk.
Instead, we read the existing index file.

This is the original behaviour when using msysgit.