use std::process::Command;
pub fn execute_git_command(args: &[String]) -> i32 {
let mut git_args = vec![
"-c".to_string(),
"color.status=always".to_string(),
"-c".to_string(),
"color.diff=always".to_string(),
"-c".to_string(),
"color.branch=always".to_string(),
"-c".to_string(),
"color.ui=always".to_string(),
];
git_args.extend_from_slice(args);
let status = Command::new("git")
.args(&git_args)
.status();
match status {
Ok(status) => status.code().unwrap_or(1),
Err(e) => {
eprintln!("Failed to execute git: {}", e);
1
}
}
}