We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 180a502 commit 76fd1d4Copy full SHA for 76fd1d4
1 file changed
lib/git/utils.py
@@ -166,7 +166,12 @@ def _release_lock(self):
166
"""
167
if not self._has_lock():
168
return
169
- os.remove(self._lock_file_path())
+
170
+ # if someone removed our file beforhand, lets just flag this issue
171
+ # instead of failing, to make it more usable.
172
+ lfp = self._lock_file_path()
173
+ if os.path.isfile(lfp):
174
+ os.remove(lfp)
175
self._owns_lock = False
176
177
0 commit comments