mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-04 07:25:44 +03:00
fix: only skip big files from snapshotting if they are untracked
This commit is contained in:
parent
027e0bec05
commit
105a355e5d
@ -225,7 +225,10 @@ fn get_exclude_list(repo: &git2::Repository) -> Result<String> {
|
|||||||
if let Some(path) = entry.path() {
|
if let Some(path) = entry.path() {
|
||||||
let path = repo_path.join(path);
|
let path = repo_path.join(path);
|
||||||
if let Ok(metadata) = fs::metadata(&path) {
|
if let Ok(metadata) = fs::metadata(&path) {
|
||||||
if metadata.is_file() && metadata.len() > SNAPSHOT_FILE_LIMIT_BYTES {
|
if metadata.is_file()
|
||||||
|
&& metadata.len() > SNAPSHOT_FILE_LIMIT_BYTES
|
||||||
|
&& entry.status().is_wt_new()
|
||||||
|
{
|
||||||
files_to_exclude.push(path);
|
files_to_exclude.push(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user