Skip to content

Git.clone requires 2 arguments instead of 1 #565

@sethfri

Description

@sethfri

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:

git = Git.clone('https://github.com/ruby-git/ruby-git.git')

However, the method itself requires both the URL and the name of the directory. You can't just use the default

Your environment

  • Git 2.34.0
  • ruby-git 1.8.1
  • Ruby 2.7.4

Steps to reproduce

git = Git.clone('https://github.com/ruby-git/ruby-git.git')

Expected behaviour

The clone will work and use ruby-git as the default name of the clone directory

Actual behaviour

The method fails with wrong number of arguments (given 1, expected 2..3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions