Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/Command/SourceControlManagement/
GetSCMBranches.rs

1//! Tauri command - list branches for an SCM provider. Drives the
2//! branch picker UI.
3//!
4//! ## Stub
5//!
6//! Wire to `SourceControlManagementProvider::GetBranches` so local
7//! and remote branches with tracking relationships and current-branch
8//! indicator are returned.
9
10use std::sync::Arc;
11
12use serde_json::{Value, json};
13use tauri::{State, command};
14
15use crate::{ApplicationState::State::ApplicationState::ApplicationState, dev_log};
16
17#[command]
18pub async fn GetSCMBranches(
19	_State:State<'_, Arc<ApplicationState>>,
20
21	ProviderIdentifier:String,
22) -> Result<Value, String> {
23	dev_log!("commands", "getting branches for provider: {}", ProviderIdentifier);
24
25	Ok(json!({
26		"branches": [
27			{ "name": "main", "isCurrent": true },
28			{ "name": "develop", "isCurrent": false },
29		],
30	}))
31}