@@ -20,7 +20,7 @@ use gitbutler_oxidize::{
2020} ;
2121use gitbutler_project:: {
2222 access:: { WorktreeReadPermission , WorktreeWritePermission } ,
23- Project ,
23+ Project , AUTO_TRACK_LIMIT_BYTES ,
2424} ;
2525use gitbutler_repo:: RepositoryExt ;
2626use gitbutler_repo:: SignaturePurpose ;
@@ -30,8 +30,6 @@ use gix::object::tree::diff::Change;
3030use gix:: prelude:: ObjectIdExt ;
3131use tracing:: instrument;
3232
33- const SNAPSHOT_FILE_LIMIT_BYTES : u64 = 32 * 1024 * 1024 ;
34-
3533/// The Oplog allows for crating snapshots of the current state of the project as well as restoring to a previous snapshot.
3634/// Snapshots include the state of the working directory as well as all additional GitButler state (e.g. virtual branches, conflict state).
3735/// The data is stored as git trees in the following shape:
@@ -312,7 +310,7 @@ impl OplogExt for Project {
312310 let old_wd_tree_id = tree_from_applied_vbranches ( & gix_repo, commit. parent ( 0 ) ?. id ( ) ) ?;
313311 let old_wd_tree = repo. find_tree ( old_wd_tree_id) ?;
314312
315- repo. ignore_large_files_in_diffs ( SNAPSHOT_FILE_LIMIT_BYTES ) ?;
313+ repo. ignore_large_files_in_diffs ( AUTO_TRACK_LIMIT_BYTES ) ?;
316314
317315 let mut diff_opts = git2:: DiffOptions :: new ( ) ;
318316 diff_opts
@@ -602,7 +600,7 @@ fn restore_snapshot(
602600 let workdir_tree_id = tree_from_applied_vbranches ( & gix_repo, snapshot_commit_id) ?;
603601 let workdir_tree = repo. find_tree ( workdir_tree_id) ?;
604602
605- repo. ignore_large_files_in_diffs ( SNAPSHOT_FILE_LIMIT_BYTES ) ?;
603+ repo. ignore_large_files_in_diffs ( AUTO_TRACK_LIMIT_BYTES ) ?;
606604
607605 // Define the checkout builder
608606 let mut checkout_builder = git2:: build:: CheckoutBuilder :: new ( ) ;
@@ -739,7 +737,7 @@ fn lines_since_snapshot(project: &Project, repo: &git2::Repository) -> Result<us
739737 // This looks at the diff between the tree of the currently selected as 'default' branch (where new changes go)
740738 // and that same tree in the last snapshot. For some reason, comparing workdir to the workdir subree from
741739 // the snapshot simply does not give us what we need here, so instead using tree to tree comparison.
742- repo. ignore_large_files_in_diffs ( SNAPSHOT_FILE_LIMIT_BYTES ) ?;
740+ repo. ignore_large_files_in_diffs ( AUTO_TRACK_LIMIT_BYTES ) ?;
743741
744742 let oplog_state = OplogHandle :: new ( & project. gb_dir ( ) ) ;
745743 let Some ( oplog_commit_id) = oplog_state. oplog_head ( ) ? else {
0 commit comments