mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-18 23:02:31 +03:00
Merge pull request #3775 from gitbutlerapp/add-snapshot-lines-threshold-option
feat: Add support for setting snapshot_lines_threshold in UpdateRequest
This commit is contained in:
commit
214706a608
@ -26,6 +26,7 @@ pub struct UpdateRequest {
|
||||
pub project_data_last_fetched: Option<project::FetchResult>,
|
||||
pub omit_certificate_check: Option<bool>,
|
||||
pub use_diff_context: Option<bool>,
|
||||
pub snapshot_lines_threshold: Option<usize>,
|
||||
}
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
@ -125,6 +126,10 @@ impl Storage {
|
||||
project.omit_certificate_check = Some(omit_certificate_check);
|
||||
}
|
||||
|
||||
if let Some(snapshot_lines_threshold) = update_request.snapshot_lines_threshold {
|
||||
project.snapshot_lines_threshold = Some(snapshot_lines_threshold);
|
||||
}
|
||||
|
||||
self.inner
|
||||
.write(PROJECTS_FILE, &serde_json::to_string_pretty(&projects)?)?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user