Cleanup index.lock after running libgit update-index

Merged username-removed-138980 requested to merge libgit-index-lock into master

Cleanup index.lock after running libgit update-index

Fixes #2668 (closed)