class
Agate::RemoteCollection
- Agate::RemoteCollection
- Reference
- Object
Overview
A collection of remotes in a repository.
Included Modules
- Enumerable(Agate::Remote)
Defined in:
agate/remote.crInstance Method Summary
-
#[](name : String) : Remote
Looks up a remote by name.
-
#[]?(name : String) : Remote | Nil
Looks up a remote by name, returning nil if not found.
-
#add_fetch_refspec(name : String, refspec : String) : Nil
Adds a fetch refspec to a remote.
-
#add_push_refspec(name : String, refspec : String) : Nil
Adds a push refspec to a remote.
-
#create(name : String, url : String) : Remote
Creates a new remote with the given name and URL.
-
#create_anonymous(url : String) : Remote
Creates an anonymous remote (no persistent configuration).
-
#delete(name : String) : Nil
Deletes a remote by name.
-
#each(& : Remote -> ) : Nil
Iterates over all remotes.
-
#each_name(& : String -> ) : Nil
Iterates over remote names.
-
#exist?(name : String) : Bool
Returns true if a remote with the given name exists.
-
#rename(old_name : String, new_name : String) : Array(String)
Renames a remote.
-
#set_push_url(name : String, url : String) : Nil
Sets the push URL for a remote.
-
#set_url(name : String, url : String) : Nil
Sets the fetch URL for a remote.
Instance Method Detail
Looks up a remote by name, returning nil if not found.
Creates a new remote with the given name and URL.
Creates an anonymous remote (no persistent configuration).
def rename(old_name : String, new_name : String) : Array(String)
#
Renames a remote. Returns any non-default refspec problems.