class Git::Repo

Defined in:

lib/repo.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.init(path : String, bare = false) #

[View source]
def self.open(path : String) #

[View source]
def self.open?(path : String) #

[View source]

Instance Method Detail

def ahead_behind(local : Oid, upstream : Oid) #

[View source]
def analyze_merge(their : AnnotatedCommit | Array(AnnotatedCommit), preference : C::MergePreferenceT? = nil) #

[View source]
def checkout(ref : Ref, name_as : String? = nil, options : CheckoutOptions? = nil) #

[View source]
def checkout_head(options : CheckoutOptions? = nil) #

[View source]
def checkout_options=(checkout_options : CheckoutOptions?) #

[View source]
def checkout_options? : CheckoutOptions? #

[View source]
def commit_is_descendant_of(commit : Oid, ancestor : Oid) #

[View source]
def commits : CommitIterator #

Iterate over the repositories commits


[View source]
def create_commit(message : String, update_ref : String? = nil, signature : Signature? = nil, message_encoding : String? = nil, parents : Commit | Array(Commit) | Nil = nil) #

[View source]
def create_commit(tree : Tree, message : String, update_ref : String? = nil, signature : Signature? = nil, message_encoding : String? = nil, parents : Commit | Array(Commit) | Nil = nil) #

[View source]
def create_ref(name : String, oid : Oid, force = false) #

[View source]
def create_ref(name : String, initial_commit_message : String? = "initial", force = false) #

Creates a reference that points to HEAD.

Creates a initial commit first if the head is unborn.


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

[View source]
def create_remote?(name : String, url : String) #

Creates a new remote.

Does nothing if the remote exists.


[View source]
def credential=(credential : Credentials::Base?) #

[View source]
def credential? : Credentials::Base? #

[View source]
def diff_options=(diff_options : DiffOptions?) #

[View source]
def diff_options? : DiffOptions? #

[View source]
def diff_to_index(tree : Tree? = nil, index : Index? = nil, options : DiffOptions? = nil) #

[View source]
def diff_to_workdir(tree : Tree? = nil, options : DiffOptions? = nil) #

[View source]
def each_ref(&block : Ref -> _) #

[View source]
def get_annotated_commit(ref : Ref) #

[View source]
def head #

[View source]
def head? #

[View source]
def lookup_commit(oid : Oid) #

[View source]
def lookup_commit?(oid : Oid) #

[View source]
def lookup_object(oid : Oid, type : LibC::Int = C::ObjAny) #

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

[View source]
def lookup_ref(name) #

[View source]
def lookup_ref?(name) #

[View source]
def lookup_remote(name) #

[View source]
def lookup_remote?(name) #

[View source]
def lookup_tree(oid : Oid) #

[View source]
def merge(their : AnnotatedCommit | Array(AnnotatedCommit), options : MergeOptions? = nil, checkout_options : CheckoutOptions? = nil) #

[View source]
def merge_options=(merge_options : MergeOptions?) #

[View source]
def merge_options? : MergeOptions? #

[View source]
def new_default_signature #

[View source]
def new_index #

[View source]
def onto(ref : Ref?, type : C::ResetT, checkout_options : CheckoutOptions? = nil, &block) #

[View source]
def parse_rev(spec : String) #

[View source]
def parse_rev?(spec : String) #

[View source]
def path #

[View source]
def rebase(upstream : AnnotatedCommit, branch : AnnotatedCommit? = nil, onto : AnnotatedCommit? = nil, options : RebaseOptions? = nil) #

[View source]
def rebase(upstream : AnnotatedCommit, branch : AnnotatedCommit? = nil, onto : AnnotatedCommit? = nil, options : RebaseOptions? = nil, signature : Signature? = nil, &block) #

[View source]
def rebase_options=(rebase_options : RebaseOptions?) #

[View source]
def rebase_options? : RebaseOptions? #

[View source]
def ref_to_oid(name : String) #

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

[View source]
def remotes #

[View source]
def reset(commit : AnnotatedCommit, type : C::ResetT, checkout_options : CheckoutOptions? = nil) #

[View source]

[View source]
def set_head(commit : AnnotatedCommit) #

[View source]
def set_head(refname : String) #

[View source]
def set_head(oid : Oid) #

[View source]
def signature=(signature : Signature?) #

[View source]
def signature? : Signature? #

[View source]