Trait nicegit::RepositoryExt[][src]

pub trait RepositoryExt {
    fn branch_names(&self, branch_type: Option<BranchType>) -> Vec<String>;
fn local_branches(&self) -> HashMap<String, Branch>;
fn ref_dwim_local(&self, name: &str) -> Option<Reference>;
fn current_branch_name(&self) -> Option<String>; }

A set of extension methods for the Repository type in git2.

Required Methods

Gets a list of all branch names for the repository, with branch_type letting you filter by local, known remote, or all known branches.

Gets a mapping of all local branches to their actual branch objects.

Do a "do what I mean" lookup on a refname - the 'fuzzy' sort you're used to from the CLI. In order of priority, this becomes:

  • Symbolic names and commit hashes
  • Named refs
  • Tags by exact name
  • The HEAD of a named branch You need to exactly match one of the above, or this search will fail.

Get the name of the currently checked out branch, if one is checked out.

Implementations on Foreign Types

impl RepositoryExt for Repository
[src]

Implementors