use std::path::PathBuf;
use crate::store::WriteReflog;
mod error {
#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum Error {
#[error("There was an error accessing the store's directory")]
Io(#[from] std::io::Error),
}
}
pub use error::Error;
use crate::file;
#[allow(dead_code)]
impl crate::Store {
pub fn at(git_dir: PathBuf, reflog_mode: WriteReflog, object_hash: gix_hash::Kind) -> Result<Self, Error> {
std::fs::read_dir(&git_dir)?;
Ok(crate::Store {
inner: crate::store::State::Loose {
store: file::Store::at(git_dir, reflog_mode, object_hash),
},
})
}
}