grgit icon indicating copy to clipboard operation
grgit copied to clipboard

unable to pass config settings when cloning

Open jscancella opened this issue 3 years ago • 1 comments

currently I don't see a way to do the equivalent in grgit git clone [repository] –config core.autocrlf=false. This affects me because I have a git repo that must be checked out with the original line endings on windows, but all my other repos don't require this and it cause me great pain to turn it off globally.

I am hoping for something like the below where I can pass in a list of key value pairs to configure the git config:

Grgit.clone(dir: location, 
                  uri: 'https://github.com/libraryofcongress/bagit-conformance-suite.git',
                  config: [{'core.autocrlf': false}])

jscancella avatar Aug 03 '22 17:08 jscancella

It doesn't look like that's an option on the JGit CloneCommand, so not sure if there's any other way through JGit's API to make that happen.

https://download.eclipse.org/jgit/site/6.2.0.202206071550-r/apidocs/org/eclipse/jgit/api/CloneCommand.html

ajoberstar avatar Aug 05 '22 00:08 ajoberstar