History

fix build (#301)

Sebastian Thiel committed 4 years ago

Commit ffe92ca1 parent d6787e41 file · +22 −27Browse files

Unified · Split

gitoxide-core/src/index/checkout.rs+22−27
@@ -83,37 +83,32 @@ pub fn checkout_exclusive( · 82 unmodified lines
8383 files_updated,
8484 bytes_written,
8585 } = match repo {
86− Some(repo) => {
87− let git_dir = repo.git_dir().to_owned();
88− git::worktree::index::checkout(
89− &mut index,
90− dest_directory,
91− git_dir,
92− {
93− let objects = repo.objects.into_arc()?;
94− move |oid, buf| {
95− objects.find_blob(oid, buf).ok();
96− if empty_files {
97− // We always want to query the ODB here…
98− objects.find_blob(oid, buf)?;
99− buf.clear();
100− // …but write nothing
101− Ok(git::objs::BlobRef { data: buf })
102− } else {
103− objects.find_blob(oid, buf)
104− }
86+ Some(repo) => git::worktree::index::checkout(
87+ &mut index,
88+ dest_directory,
89+ {
90+ let objects = repo.objects.into_arc()?;
91+ move |oid, buf| {
92+ objects.find_blob(oid, buf).ok();
93+ if empty_files {
94+ // We always want to query the ODB here…
95+ objects.find_blob(oid, buf)?;
96+ buf.clear();
97+ // …but write nothing
98+ Ok(git::objs::BlobRef { data: buf })
99+ } else {
100+ objects.find_blob(oid, buf)
105101 }
106− },
107− &mut files,
108− &mut bytes,
109− should_interrupt,
110− opts,
111− )
112− }
102+ }
103+ },
104+ &mut files,
105+ &mut bytes,
106+ should_interrupt,
107+ opts,
108+ ),
113109 None => git::worktree::index::checkout(
114110 &mut index,
115111 dest_directory,
116− dest_directory,
117112 |_, buf| {
118113 buf.clear();
119114 Ok(git::objs::BlobRef { data: buf })