Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/Command/SourceControlManagement/
GetSCMCommitHistory.rs

1//! Tauri command - paginated commit log for the SCM viewlet's
2//! Timeline panel.
3//!
4//! ## Stub
5//!
6//! Wire to `SourceControlManagementProvider::GetHistory`; return
7//! structured commits with hash, author, date, message, parents.
8
9use std::sync::Arc;
10
11use serde_json::{Value, json};
12use tauri::{State, command};
13
14use crate::{ApplicationState::State::ApplicationState::ApplicationState, dev_log};
15
16#[command]
17pub async fn GetSCMCommitHistory(
18	_State:State<'_, Arc<ApplicationState>>,
19
20	MaxCount:Option<usize>,
21) -> Result<Value, String> {
22	dev_log!("commands", "getting commit history, max count: {:?}", MaxCount);
23
24	let MaxCommits = MaxCount.unwrap_or(50);
25
26	Ok(json!({
27		"commits": Vec::<Value>::new(),
28		"maxCount": MaxCommits,
29	}))
30}