struct Sherd::Git
- Sherd::Git
- Struct
- Value
- Object
Defined in:
git.crConstructors
-
.new(uri : URI, directory : Path, verbose : Bool = false)
Creates a new Git repositor by cloning it or updates it if already present.
Instance Method Summary
-
#copy(version_or_rev : SemanticVersion | Revision, destination : Path)
Copy the repository to a given version.
-
#each_version(&block : String -> ) : Nil
Yields each version tag, starting with
v
, for a given repository path. - #name : String
- #repository_path : Path
-
#show(version_or_rev : SemanticVersion | Object::Type, file : String) : String | Nil
Show a file at a revision.
- #uri : URI
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.
Instance Method Detail
Copy the repository to a given version.
def each_version(&block : String -> ) : Nil
#
Yields each version tag, starting with v
, for a given repository path.
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.