◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
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)
except OSError as e:
raise IOError(str(e)) from e

Expand Down
3 changes: 2 additions & 1 deletion test/test_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import pickle
import sys
import tempfile
from unittest import mock, skipIf, SkipTest

import pytest

Expand Down Expand Up @@ -251,6 +251,7 @@ def test_clone_from_with_path_contains_unicode(self):
self.fail("Raised UnicodeEncodeError")

@with_rw_directory
def test_leaking_password_in_clone_logs(self, rw_dir):
password = "fakepassword1234"
try:
Expand Down
Toggle all file notes Toggle all file annotations