use std::path::Path;
pub struct GitOperations {
repo: git2::Repository,
}
impl GitOperations {
pub fn new(config_dir: &Path) -> anyhow::Result<Self> {
let repo = git2::Repository::open(config_dir)?;
Ok(Self { repo })
}
pub fn add_remote(&self, name: &str, url: &str) -> anyhow::Result<()> {
self.repo.remote(name, url)?;
Ok(())
}
pub fn push(&self, _remote: &str, _branch: &str) -> anyhow::Result<()> {
Ok(())
}
pub fn pull(&self, _remote: &str, _branch: &str) -> anyhow::Result<()> {
Ok(())
}
}