Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/SantaClaas/gigit. git client
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445//! The Tauri command surface.//!//! Every command is a thin translation between the IPC boundary and the//! workspace actor. No logic lives here.
use std::path::PathBuf;
use gigit_git::{RefEntry, RepositorySummary};use tauri::State;
use crate::error::Result;use crate::workspace::{OpenedRepository, RepositoryId, WorkspaceHandle};
#[tauri::command]pub async fn open_repository( path: PathBuf, workspace: State<'_, WorkspaceHandle>,) -> Result<OpenedRepository> { workspace.open(path).await}
#[tauri::command]pub async fn close_repository( id: RepositoryId, workspace: State<'_, WorkspaceHandle>,) -> Result<bool> { workspace.close(id).await}
#[tauri::command]pub async fn repository_summary( id: RepositoryId, workspace: State<'_, WorkspaceHandle>,) -> Result<RepositorySummary> { workspace.summary(id).await}
#[tauri::command]pub async fn list_references( id: RepositoryId, workspace: State<'_, WorkspaceHandle>,) -> Result<Vec<RefEntry>> { workspace.references(id).await}