summaryrefslogtreecommitdiff
path: root/git/test/test_repo.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/test/test_repo.py')
-rw-r--r--git/test/test_repo.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/git/test/test_repo.py b/git/test/test_repo.py
index 7fc49f3b..0577bd58 100644
--- a/git/test/test_repo.py
+++ b/git/test/test_repo.py
@@ -229,6 +229,22 @@ class TestRepo(TestBase):
Repo.clone_from(original_repo.git_dir, pathlib.Path(rw_dir) / "clone_pathlib")
+ @with_rw_directory
+ def test_clone_from_pathlib_withConfig(self, rw_dir):
+ if pathlib is None: # pythons bellow 3.4 don't have pathlib
+ raise SkipTest("pathlib was introduced in 3.4")
+
+ original_repo = Repo.init(osp.join(rw_dir, "repo"))
+
+ cloned = Repo.clone_from(original_repo.git_dir, pathlib.Path(rw_dir) / "clone_pathlib_withConfig",
+ multi_options=["--recurse-submodules=repo",
+ "--config core.filemode=false",
+ "--config submodule.repo.update=checkout"])
+
+ assert_equal(cloned.config_reader().get_value('submodule', 'active'), 'repo')
+ assert_equal(cloned.config_reader().get_value('core', 'filemode'), False)
+ assert_equal(cloned.config_reader().get_value('submodule "repo"', 'update'), 'checkout')
+
@with_rw_repo('HEAD')
def test_max_chunk_size(self, repo):
class TestOutputStream(object):