File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8272,6 +8272,30 @@ export class AppStore extends TypedBaseStore<IAppState> {
82728272 }
82738273 }
82748274
8275+ public async _updateRepositoryPath (
8276+ repository : Repository ,
8277+ path : string
8278+ ) : Promise < void > {
8279+ const rt = await getRepositoryType ( path )
8280+
8281+ if ( rt . kind === 'regular' ) {
8282+ await this . repositoriesStore . updateRepositoryPath (
8283+ repository ,
8284+ rt . topLevelWorkingDirectory ,
8285+ rt . gitDir
8286+ )
8287+ } else if ( rt . kind === 'unsafe' ) {
8288+ await this . repositoriesStore . updateRepositoryPath (
8289+ repository ,
8290+ path ,
8291+ undefined ,
8292+ true
8293+ )
8294+ } else {
8295+ this . emitError ( new Error ( this . getInvalidRepoPathsMessage ( [ path ] ) ) )
8296+ }
8297+ }
8298+
82758299 public async _removeRepository (
82768300 repository : Repository | CloningRepository ,
82778301 moveToTrash : boolean
Original file line number Diff line number Diff line change @@ -1926,6 +1926,14 @@ export class Dispatcher {
19261926 return this . appStore . _relocateRepository ( repository )
19271927 }
19281928
1929+ /** Update the repository's path. */
1930+ public async updateRepositoryPath (
1931+ repository : Repository ,
1932+ path : string
1933+ ) : Promise < void > {
1934+ await this . appStore . _updateRepositoryPath ( repository , path )
1935+ }
1936+
19291937 /**
19301938 * Change the workflow preferences for the specified repository.
19311939 *
You can’t perform that action at this time.
0 commit comments