struct Sherd::Git

Defined in:

git.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(uri : URI, directory : Path, verbose : Bool = false) #

Creates a new Git repositor by cloning it or updates it if already present.


[View source]

Instance Method Detail

def copy(version_or_rev : SemanticVersion | Revision, destination : Path) #

Copy the repository to a given version.


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

Yields each version tag, starting with v, for a given repository path.


[View source]
def name : String #

[View source]
def repository_path : Path #

[View source]
def show(version_or_rev : SemanticVersion | Object::Type, file : String) : String | Nil #

Show a file at a revision. Returns nil if not present, or if the command failed.


[View source]
def uri : URI #

[View source]