File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ impl GitDatabase {
187187 // clone is created.
188188 let checkout = match git2:: Repository :: open ( dest)
189189 . ok ( )
190- . map ( |repo| GitCheckout :: new ( dest , self , rev, repo) )
190+ . map ( |repo| GitCheckout :: new ( self , rev, repo) )
191191 . filter ( |co| co. is_fresh ( ) )
192192 {
193193 Some ( co) => co,
@@ -265,13 +265,13 @@ impl<'a> GitCheckout<'a> {
265265 /// is done. Use [`GitCheckout::is_fresh`] to check.
266266 ///
267267 /// * The `database` is where this checkout is from.
268- /// * The `repo` will be the checked out Git repoistory at `path` .
268+ /// * The `repo` will be the checked out Git repoistory.
269269 fn new (
270- path : & Path ,
271270 database : & ' a GitDatabase ,
272271 revision : git2:: Oid ,
273272 repo : git2:: Repository ,
274273 ) -> GitCheckout < ' a > {
274+ let path = repo. workdir ( ) . unwrap_or_else ( || repo. path ( ) ) ;
275275 GitCheckout {
276276 path : path. to_path_buf ( ) ,
277277 database,
@@ -335,7 +335,7 @@ impl<'a> GitCheckout<'a> {
335335 } ) ?;
336336 let repo = repo. unwrap ( ) ;
337337
338- let checkout = GitCheckout :: new ( into , database, revision, repo) ;
338+ let checkout = GitCheckout :: new ( database, revision, repo) ;
339339 checkout. reset ( config) ?;
340340 Ok ( checkout)
341341 }
You can’t perform that action at this time.
0 commit comments