Skip to main content

Mountain/Command/SourceControlManagement/
GetSCMCommitHistory.rs

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