girt-core 2.3.0

Core modules for git-interactive-rebase-tool
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::{env::set_var, path::Path};

pub(crate) fn set_git_directory(repo: &str) -> String {
	let path = Path::new(env!("CARGO_MANIFEST_DIR"))
		.join("..")
		.join("..")
		.join("test")
		.join(repo)
		.canonicalize()
		.unwrap();
	set_var("GIT_DIR", path.to_str().unwrap());
	String::from(path.to_str().unwrap())
}