@@ -14,7 +14,7 @@ import JSZip from 'jszip'
1414import path from 'path'
1515import FormData from 'form-data'
1616import axios from 'axios'
17- import { Registry } from '@remix-project/remix-lib'
17+ import { Registry } from '@remix-project/remix-lib'
1818
1919const profile = {
2020 name : 'dGitProvider' ,
@@ -121,7 +121,6 @@ class DGitProvider extends Plugin {
121121 return status
122122 }
123123
124-
125124 const status = await git . statusMatrix ( {
126125 ...await this . getGitConfig ( ) ,
127126 ...cmd
@@ -189,7 +188,7 @@ class DGitProvider extends Plugin {
189188 return newmodule . name === module . name
190189 } )
191190 } )
192-
191+
193192 for ( const module of toRemove ) {
194193 const path = ( await this . getGitConfig ( module . path ) ) . dir
195194 if ( await window . remixFileSystem . exists ( path ) ) {
@@ -224,7 +223,6 @@ class DGitProvider extends Plugin {
224223 return status
225224 }
226225
227-
228226 const status = await git . log ( {
229227 ...await this . getGitConfig ( ) ,
230228 ...cmd ,
@@ -269,8 +267,6 @@ class DGitProvider extends Plugin {
269267
270268 async currentbranch ( config ) {
271269
272-
273-
274270 if ( ( Registry . getInstance ( ) . get ( 'platform' ) . api . isDesktop ( ) ) ) {
275271 return await this . call ( 'isogit' , 'currentbranch' )
276272 }
@@ -426,11 +422,11 @@ class DGitProvider extends Plugin {
426422 input
427423 }
428424 this . call ( 'terminal' , 'logHtml' , `Cloning ${ input . url } ... please wait...` )
429- try {
425+ try {
430426 const result = await this . call ( 'isogit' , 'clone' , cmd )
431427 this . call ( 'fs' , 'openWindow' , folder )
432428 return result
433- } catch ( e ) {
429+ } catch ( e ) {
434430 this . call ( 'notification' , 'alert' , {
435431 id : 'dgitAlert' ,
436432 message : 'Unexpected error while cloning the repository: \n' + e . toString ( ) ,
@@ -516,7 +512,7 @@ class DGitProvider extends Plugin {
516512 for ( const module of gitmodules ) {
517513 const dir = path . join ( currentDir , module . path )
518514 // if url contains git@github .com: convert it
519- if ( module . url && module . url . startsWith ( '[email protected] :' ) ) { 515+ if ( module . url && module . url . startsWith ( '[email protected] :' ) ) { 520516 module . url = module . url . replace ( '[email protected] :' , 'https://github.com/' ) 521517 }
522518 try {
@@ -530,7 +526,7 @@ class DGitProvider extends Plugin {
530526 this . call ( 'terminal' , 'logHtml' , `Cloning submodule ${ dir } ...` )
531527 await git . clone ( cmd )
532528 this . call ( 'terminal' , 'logHtml' , `Cloned successfully submodule ${ dir } ...` )
533-
529+
534530 const commitHash = await git . resolveRef ( {
535531 ...await this . getGitConfig ( currentDir ) ,
536532 ref : 'HEAD'
@@ -540,12 +536,12 @@ class DGitProvider extends Plugin {
540536 ...await this . getGitConfig ( currentDir ) ,
541537 trees : [ git . TREE ( { ref : commitHash } ) ] ,
542538 map : async function ( filepath , [ A ] ) {
543- if ( filepath === module . path ) {
539+ if ( filepath === module . path ) {
544540 return await A . oid ( )
545541 }
546542 }
547543 } )
548- if ( result && result . length ) {
544+ if ( result && result . length ) {
549545 this . call ( 'terminal' , 'logHtml' , `Checking out submodule ${ dir } to ${ result [ 0 ] } in directory ${ dir } ` )
550546 await git . fetch ( {
551547 ...await this . parseInput ( input ) ,
@@ -558,16 +554,16 @@ class DGitProvider extends Plugin {
558554 ...await this . getGitConfig ( dir ) ,
559555 ref : result [ 0 ]
560556 } )
561-
557+
562558 const log = await git . log ( {
563559 ...await this . getGitConfig ( dir ) ,
564560 } )
565561
566- if ( log [ 0 ] . oid !== result [ 0 ] ) {
562+ if ( log [ 0 ] . oid !== result [ 0 ] ) {
567563 this . call ( 'terminal' , 'log' , {
568564 type : 'error' ,
569565 value : `Could not checkout submodule to ${ result [ 0 ] } `
570- } ) } else {
566+ } ) } else {
571567 this . call ( 'terminal' , 'logHtml' , `Checked out submodule ${ dir } to ${ result [ 0 ] } ` )
572568 }
573569 }
0 commit comments