Struct git_repository::Repository[][src]

pub struct Repository {
    pub refs: Store,
    pub work_tree: Option<PathBuf>,
    // some fields omitted
}
Expand description

A instance with access to everything a git repository entails, best imagined as container for most for system resources required to interact with a git repository which are loaded in once the instance is created.

These resources are meant to be shareable across threads and used by most using an Easy* type has a handle carrying additional in-memory data to accelerate data access or hold volatile data. Depending on context, EasyShared gets the fastest read-only access to the repository, whereas Easy has to go through an Rc and EasyArcExclusive through an Arc<RwLock>.

Namely, this is an object database, a reference database to point to objects.

Fields

refs: Store

A store for references to point at objects

work_tree: Option<PathBuf>

TODO: git-config should be here - it’s read a lot but not written much in must applications, so shouldn’t be in State. Probably it’s best reload it on signal (in servers) or refresh it when it’s known to have been changed similar to how packs are refreshed. This would be git_config::fs::Config when ready. The path to the worktree at which to find checked out files

Implementations

Really just a sketch at this point to help guide the API.

Trait Implementations

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.