Skip to content

Update Git.clone to set multiple config variables #653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2023
Merged

Conversation

jcouball
Copy link
Member

@jcouball jcouball commented Mar 7, 2023

Your checklist for this pull request

🚨Please review the guidelines for contributing to this repository.

  • Ensure all commits include DCO sign-off.
  • Ensure that your contributions pass unit testing.
  • Ensure that your contributions contain documentation if applicable.

Description

Currently, Git.clone only allows setting a single config variable via the :config option. This option is given as a string as follows:

Git.clone(uri, destination, { config: 'submodule.recurse=true' }

This PR allows an Array to be given for :config (in addition to still supporting the single String value):

g = Git.clone(
  uri, destination,
  :config => [
    'core.sshCommand=ssh -i /home/user/.ssh/id_rsa',
    'submodule.recurse=true'
  ]
)

See [git-clone --config](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt--cltkeygtltvaluegt) for more details.

Signed-off-by: James Couball <jcouball@yahoo.com>
@jcouball jcouball merged commit 5b0e1c8 into master Mar 7, 2023
@jcouball jcouball deleted the clone_config branch March 10, 2023 00:26
@jcouball jcouball mentioned this pull request Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant