#401 Set configuration in case of "clone --branches" as well
Merged 5 years ago by lsedlar. Opened 5 years ago by scfc.

file modified
+5
@@ -1508,6 +1508,7 @@ 

  

          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 @@ 

                                "--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)

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 tim@tim-landscheidt.de

Looks good to me, and I tested it works fine. Thank you!

Pull-Request has been merged by lsedlar

5 years ago