1
0
Fork 0

Merging upstream version 0.16.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-11 18:46:39 +01:00
parent 761a845342
commit 6cfcc808bb
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
14 changed files with 83 additions and 889 deletions

View file

@ -11,7 +11,6 @@ def fullpath(fname: str):
PATH_FNAME = fullpath('mock_path_file')
PATH_FNAME_EMPTY = fullpath('empty_path_file')
PATH_FNAME_CLASH = fullpath('clash_path_file')
PATH_FNAME_MAIN = fullpath('main_path_file')
GROUP_FNAME = fullpath('mock_group_file')
def async_mock():

View file

@ -1,2 +0,0 @@
/path/to/main/,main1,m
/xxx/xx,xx,

View file

@ -9,7 +9,7 @@ import shlex
from gita import __main__
from gita import utils, info, common
from conftest import (
PATH_FNAME, PATH_FNAME_EMPTY, PATH_FNAME_CLASH, GROUP_FNAME, PATH_FNAME_MAIN,
PATH_FNAME, PATH_FNAME_EMPTY, PATH_FNAME_CLASH, GROUP_FNAME,
async_mock, TEST_DIR,
)
@ -115,8 +115,6 @@ class TestLsLl:
(PATH_FNAME,
"repo1 cmaster dsu\x1b[0m msg \nrepo2 cmaster dsu\x1b[0m msg \nxxx cmaster dsu\x1b[0m msg \n"),
(PATH_FNAME_EMPTY, ""),
(PATH_FNAME_MAIN,
'\x1b[4mmain1\x1b[0m cmaster dsu\x1b[0m msg \nxx cmaster dsu\x1b[0m msg \n'),
(PATH_FNAME_CLASH,
"repo1 cmaster dsu\x1b[0m msg \nrepo2 cmaster dsu\x1b[0m msg \n"
),
@ -188,6 +186,7 @@ def test_clone_with_preserve_path(*_):
mock_run.assert_called_once_with('repo', Path.cwd(), cmds)
@patch('os.makedirs')
@patch('os.path.isfile', return_value=True)
@patch('gita.common.get_config_fname', return_value='some path')
@patch('gita.utils.get_repos', return_value={'repo1': {'path': '/a/', 'type': ''},

View file

@ -176,4 +176,4 @@ def test_is_git(tmpdir):
with tmpdir.as_cwd():
subprocess.run('git init --bare .'.split())
assert utils.is_git(Path.cwd()) is False
assert utils.is_git(Path.cwd(), is_bare=True) is True
assert utils.is_git(Path.cwd(), include_bare=True) is True