DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/Command/SourceControlManagement/
GetSCMCommitHistory.rs1use 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}