From 3b8c9548a12810e2e91846d2018283680f758a5d Mon Sep 17 00:00:00 2001 From: Tim Landscheidt Date: Dec 03 2018 02:14:07 +0000 Subject: Set configuration in case of "clone --branches" as well Currently, the configuration settings for credential.helper and credential.useHttpPath and the template from clone_config are only applied when cloning into a single target directory. This change applies them to all target directories when called with the option "--branches" set. Signed-off-by: Tim Landscheidt --- diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py index eccc003..74ad0e2 100644 --- a/pyrpkg/__init__.py +++ b/pyrpkg/__init__.py @@ -1508,6 +1508,7 @@ class Commands(object): self._run_command(cmd, cwd=path) + # Set configuration base_repo = self.get_base_repo(repo) git_dir = target if target else bare_dir if bare_dir else base_repo conf_git = git.Git(os.path.join(path, git_dir)) @@ -1578,6 +1579,10 @@ class Commands(object): "--origin", self.default_branch_remote, repo_path, branch) + # Set configuration + conf_git = git.Git(os.path.join(top_path, branch)) + self._clone_config(conf_git, repo) + # Set the origin correctly branch_path = os.path.join(top_path, branch) branch_git = git.Git(branch_path)