Skip to main content

Mountain/Command/SourceControlManagement/
GetSCMCommitHistory.rs

1
2//! Tauri command - paginated commit log for the SCM viewlet's
3//! Timeline panel.
4//!
5//! ## Stub
6//!
7//! Wire to `SourceControlManagementProvider::GetHistory`; return
8//! structured commits with hash, author, date, message, parents.
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 GetSCMCommitHistory(
19	_State:State<'_, Arc<ApplicationState>>,
20
21	MaxCount:Option<usize>,
22) -> Result<Value, String> {
23	dev_log!("commands", "getting commit history, max count: {:?}", MaxCount);
24
25	let MaxCommits = MaxCount.unwrap_or(50);
26
27	Ok(json!({
28		"commits": Vec::<Value>::new(),
29		"maxCount": MaxCommits,
30	}))
31}