rename git::add_file() to just add(), it can add directories too

This commit is contained in:
Sebastian Kuzminsky 2025-07-11 10:01:05 -06:00
parent 0d6c43d266
commit 7b6efdf925
3 changed files with 3 additions and 3 deletions

View file

@ -136,7 +136,7 @@ pub fn worktree_is_dirty(dir: &str) -> Result<bool, GitError> {
return Ok(result.stdout.len() > 0);
}
pub fn add_file(file: &std::path::Path) -> Result<(), GitError> {
pub fn add(file: &std::path::Path) -> Result<(), GitError> {
let result = std::process::Command::new("git")
.args(["add", &file.to_string_lossy()])
.current_dir(file.parent().unwrap())