File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,9 @@ pub(crate) fn save_and_return_to_workspace(
235235 let parents = commit. parents ( ) . collect :: < Vec < _ > > ( ) ;
236236
237237 // Recommit commit
238- let tree = repository. create_wd_tree ( AUTO_TRACK_LIMIT_BYTES ) ?;
238+ // While we perform hard resets we should pick up everything to avoid loosing worktree state.
239+ let pick_up_untracked_files_of_any_size = 0 ;
240+ let tree = repository. create_wd_tree ( pick_up_untracked_files_of_any_size) ?;
239241
240242 let ( _, committer) = repository. signatures ( ) ?;
241243 let commit_headers = commit
Original file line number Diff line number Diff line change @@ -20,4 +20,5 @@ pub fn configure_git2() {
2020}
2121
2222/// The maximum size of files to automatically start tracking, i.e. untracked files we pick up for tree-creation.
23- pub const AUTO_TRACK_LIMIT_BYTES : u64 = 32 * 1024 * 1024 ;
23+ /// **Inactive for now** while it's hard to tell if it's safe *not* to pick up everything.
24+ pub const AUTO_TRACK_LIMIT_BYTES : u64 = 0 ;
You can’t perform that action at this time.
0 commit comments