Skip to content

Commit a1c472b

Browse files
authored
Merge pull request #1619 from HageMaster3108/bugfix/use-python-builtin-open-method-to-create-lockfile-to-workaround-docker-virtiofs-permission-issue
#1566 Creating a lock now uses python built-in "open()" method to work arou…
2 parents 8b75434 + 70924c4 commit a1c472b

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

git/util.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -935,11 +935,7 @@ def _obtain_lock_or_raise(self) -> None:
935935
)
936936

937937
try:
938-
flags = os.O_WRONLY | os.O_CREAT | os.O_EXCL
939-
if is_win:
940-
flags |= os.O_SHORT_LIVED
941-
fd = os.open(lock_file, flags, 0)
942-
os.close(fd)
938+
open(lock_file, mode='w', closefd=True)
943939
except OSError as e:
944940
raise IOError(str(e)) from e
945941

test/test_repo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import pickle
1414
import sys
1515
import tempfile
16-
from unittest import mock, skipIf, SkipTest
16+
from unittest import mock, skipIf, SkipTest, skip
1717

1818
import pytest
1919

@@ -251,6 +251,7 @@ def test_clone_from_with_path_contains_unicode(self):
251251
self.fail("Raised UnicodeEncodeError")
252252

253253
@with_rw_directory
254+
@skip("the referenced repository was removed, and one needs to setup a new password controlled repo under the orgs control")
254255
def test_leaking_password_in_clone_logs(self, rw_dir):
255256
password = "fakepassword1234"
256257
try:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy