class Agate::RemoteCollection

Overview

A collection of remotes in a repository.

Included Modules

Defined in:

agate/remote.cr

Instance Method Summary

Instance Method Detail

def [](name : String) : Remote #

Looks up a remote by name. Raises on failure.


[View source]
def []?(name : String) : Remote | Nil #

Looks up a remote by name, returning nil if not found.


[View source]
def add_fetch_refspec(name : String, refspec : String) : Nil #

Adds a fetch refspec to a remote.


[View source]
def add_push_refspec(name : String, refspec : String) : Nil #

Adds a push refspec to a remote.


[View source]
def create(name : String, url : String) : Remote #

Creates a new remote with the given name and URL.


[View source]
def create_anonymous(url : String) : Remote #

Creates an anonymous remote (no persistent configuration).


[View source]
def delete(name : String) : Nil #

Deletes a remote by name.


[View source]
def each(& : Remote -> ) : Nil #

Iterates over all remotes.


[View source]
def each_name(& : String -> ) : Nil #

Iterates over remote names.


[View source]
def exist?(name : String) : Bool #

Returns true if a remote with the given name exists.


[View source]
def rename(old_name : String, new_name : String) : Array(String) #

Renames a remote. Returns any non-default refspec problems.


[View source]
def set_push_url(name : String, url : String) : Nil #

Sets the push URL for a remote.


[View source]
def set_url(name : String, url : String) : Nil #

Sets the fetch URL for a remote.


[View source]