use std::path::PathBuf;
fn main() -> anyhow::Result<()> {
unsafe {
git2::opts::set_mwindow_size(64 * 1024 * 1024).ok();
git2::opts::set_mwindow_mapped_limit(256 * 1024 * 1024).ok();
}
let repo_path = std::env::args().nth(1).map(PathBuf::from).or_else(|| {
let cwd = std::env::current_dir().ok()?;
if cwd.join(".git").exists() {
Some(cwd)
} else {
None
}
});
gitkraft_tui::run(repo_path)
}