pub mod add;
pub mod branch;
pub mod commit;
pub mod init;
use std::{fs, io, path::Path};
#[macro_export]
macro_rules! error {
($message:tt) => {
io::Error::new(io::ErrorKind::Other, $message.to_string())
};
}
pub fn in_repo() -> bool {
Path::new(".rvcs").exists() && Path::new(".rvcs").is_dir()
}
pub fn get_current_branch() -> io::Result<String> {
fs::read_to_string(".rvcs/CURRENT_BRANCH")
}
pub fn ok() -> String {
"[ \x1b[0;32mok\x1b[0m ]".to_owned()
}