File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -333,7 +333,7 @@ fn do_work(id: u64, workdir: PathBuf) -> Result<()> {
333333 // We (hopefully) now have exclusive access to the worktree.
334334 let mut worktree_path = workdir. clone ( ) ;
335335 worktree_path. push ( format ! ( "snowpatch{}" , worker_id) ) ;
336- let repo = Repository :: open ( & worktree_path) ?;
336+ let mut repo = Repository :: open ( & worktree_path) ?;
337337
338338 clean_and_reset ( & repo, "master" ) ?;
339339
@@ -357,7 +357,9 @@ fn do_work(id: u64, workdir: PathBuf) -> Result<()> {
357357 // There's a disappointingly large chance that a series that won't
358358 // apply with git2 will actually apply just fine with the binary.
359359 // So let's do that instead.
360+ drop ( repo) ;
360361 git_binary_apply_mbox ( & worktree_path, & mbox) ?;
362+ repo = Repository :: open ( & worktree_path) ?;
361363 }
362364 }
363365
You can’t perform that action at this time.
0 commit comments