-
Notifications
You must be signed in to change notification settings - Fork 533
Git.clone requires 2 arguments instead of 1 #565
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
Comments
also if you do
|
Take a look at #578 which makes the # assume I am starting in the `/Users/me/Projects` directory
g = Git.clone('https://github.com/ruby-git/ruby-git')
g.dir.to_s #=> "/Users/me/Projects/ruby-git" Since the definition of Git.clone is: def self.clone(repository_url, directory = nil, options = {}) In order to pass a an option, you will need to pass g = Git.clone(GIT_URL, branch: 'master') Instead, you will need to do this: g = Git.clone(GIT_URL, nil, branch: 'master') I think we will need to transition to using keyword parameters (or move the |
Subject of the issue
In the example usage of
Git.clone
, the documentation says that it can be called with only the URL of the repo, like so:However, the method itself requires both the URL and the name of the directory. You can't just use the default
Your environment
Steps to reproduce
Expected behaviour
The clone will work and use
ruby-git
as the default name of the clone directoryActual behaviour
The method fails with
wrong number of arguments (given 1, expected 2..3)
The text was updated successfully, but these errors were encountered: