[PATCH] hold_index_file_for_update should not unlink failed to open .lock files atexit
From: Alex Riesen <hidden>
Date: 2016-06-15 22:42:08
Hello, I noticed that index.lock is one time removed by git-update-index and the other time not (I am still trying to make the rename behave on my cygwin installation). The atexit callback removes .lock file uncoditionally, whether it was opened by the current process or not. I fixed this with the attached (sorry, it's windows+firefox+gmail) patch. The patch sets up atexit only if the file was opened successfully.