sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

Rugged::Repository.clone_at

Clone a repository from +url+ to +local_path+.

The following options can be passed in the +options+ Hash:

:bare ::
  If +true+, the clone will be created as a bare repository.
  Defaults to +false+.

:checkout_branch ::
  The name of a branch to checkout. Defaults to the remote's +HEAD+.

:remote ::
  The name to give to the "origin" remote. Defaults to <tt>"origin"</tt>.

:ignore_cert_errors ::
  If set to +true+, errors while validating the remote's host certificate will be ignored.

:credentials ::
  The credentials to use for the clone operation. Can be either an instance of one
  of the Rugged::Credentials types, or a proc returning one of the former.
  The proc will be called with the +url+, the +username+ from the url (if applicable) and
  a list of applicable credential types.

:progress ::
  A callback that will be executed with the textual progress received from the remote.
  This is the text send over the progress side-band (ie. the "counting objects" output).

:transfer_progress ::
  A callback that will be executed to report clone progress information. It will be passed
  the amount of +total_objects+, +indexed_objects+, +received_objects+, +local_objects+,
  +total_deltas+, +indexed_deltas+, and +received_bytes+.

:update_tips ::
  A callback that will be executed each time a reference was updated locally. It will be
  passed the +refname+, +old_oid+ and +new_oid+.

Example:

  Repository.clone_at("https://github.com/libgit2/rugged.git", "./some/dir", {
    transfer_progress: lambda { |total_objects, indexed_objects, received_objects, local_objects, total_deltas, indexed_deltas, received_bytes|
      # ...
    }
  })

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_repo.c

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Rugged--Repository-clone_at-for-pr


# Commit to git

git add app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_repo.cgit commit -m "better docs for Rugged::Repository.clone_at"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Rugged--Repository-clone_at-for-pr

hub pull-request


# Celebrate!