feat: add rename branch functionality with UI integration

This commit is contained in:
Bohdan Triapitsyn
2026-01-08 01:13:51 +02:00
parent d6f74087c4
commit 8902662f74
13 changed files with 284 additions and 3 deletions
@@ -1696,6 +1696,22 @@ pub async fn create_branch(
Ok(())
}
#[tauri::command]
pub async fn rename_branch(
directory: String,
old_name: String,
new_name: String,
state: State<'_, DesktopRuntime>,
) -> Result<(), String> {
let root = validate_git_path(&directory, state.settings())
.await
.map_err(|e| e.to_string())?;
run_git(&["branch", "-m", &old_name, &new_name], &root)
.await
.map_err(|e| e.to_string())?;
Ok(())
}
#[tauri::command]
pub async fn get_git_log(
directory: String,