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
Passing CloneOptions #127
Comments
+1, I would also like some more documentation on what Update: |
Do you have a use example from your update @Glavin001 ? I found this page too with seemingly more options: This did nothing:
thanks, |
I did not end up trying it, unfortunately. You can see my basic usage here: https://github.com/Coders-Classroom/Coders-Classroom/blob/master/server/index.js#L80
That's how I would suppose the usage would work. Although, I don't follow your syntax for the object (typo?):
Maybe try it with an exist branch (see https://github.com/nodegit/nodegit/branches ) such as git.Repo.clone("https://github.com/nodegit/nodegit.git", path, { remote_name: 'gh-pages' }, function(error, repo) {
// ...
} I am unable to try right now but I'll try and take a look later tonight. |
Thanks for getting back to me! Tried an object in there, got this error when trying to run it:
when it's an array, no error, but nothing changes. Using gh-pages had no effect either. thanks, |
I also can not get this to work. I am trying to pass checkout_branch as an argument.
|
If I add the clone_options.cc file to the binding.gyp and build using |
ok I have worked out that the clone_options do not need to be included in the gyp file because the repo.cc file checks that the value is an object and then tries to convert it into clone_options for you. So in theory |
Thank you for delving into this @mccormicka |
Hi @scottnath I think this is an issue with nodegit. It can not convert the javascript object to the correct GitCloneOptions object that nodegit requires. Unfortunately I can not find any good documentation on how to do this and I do not really have the time to get much deeper into the code. It would be great if one of the authors could pitch in on this issue. |
+1, same issue here. |
Would like to be able to pass the --mirror option to clone. +1 for getting this to work. |
I was impressed by the richness of the +1 |
+1 for mirror |
Will be available once #187 lands. |
This should be fixed on master now. |
|
I tried using a javascript object, and various combinations of arrays and strings.
I then tried instantiating
git.CloneOptions
, but it was complaining about needinggit_clone_options
. There appears to be a libgit2 macroGIT_CLONE_OPTIONS_INIT
but I've no idea how to call it.Any help / pointers would be great, thank you.
The text was updated successfully, but these errors were encountered: