Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions git/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,11 +935,7 @@ def _obtain_lock_or_raise(self) -> None:
)

try:
flags = os.O_WRONLY | os.O_CREAT | os.O_EXCL
if is_win:
flags |= os.O_SHORT_LIVED
fd = os.open(lock_file, flags, 0)
os.close(fd)
open(lock_file, mode='w', closefd=True)
except OSError as e:
raise IOError(str(e)) from e

Expand Down