File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3141,6 +3141,13 @@ export class AppStore extends TypedBaseStore<IAppState> {
31413141 return status
31423142 }
31433143
3144+ public async _loadStatusLight (
3145+ repository : Repository
3146+ ) : Promise < IStatusResult | null > {
3147+ const gitStore = this . gitStoreCache . get ( repository )
3148+ return await gitStore . loadStatusLight ( )
3149+ }
3150+
31443151 /**
31453152 * This method is to initialize a multi commit operation state on app load
31463153 * if conflicts are found but not multi commmit operation exists.
Original file line number Diff line number Diff line change @@ -1212,6 +1212,15 @@ export class GitStore extends BaseStore {
12121212 return status
12131213 }
12141214
1215+ public async loadStatusLight ( ) : Promise < IStatusResult | null > {
1216+ try {
1217+ return await getStatus ( this . repository )
1218+ } catch ( e ) {
1219+ log . error ( 'Failed to load repository status' , e )
1220+ return null
1221+ }
1222+ }
1223+
12151224 /**
12161225 * Find a commit in the local cache, or load in the commit from the underlying
12171226 * repository.
Original file line number Diff line number Diff line change @@ -121,8 +121,7 @@ class TrampolineUIHelper {
121121 public async getLoginForRepositoryPath ( path : string ) : Promise < string | null > {
122122 const repo = await this . dispatcher . getRepositoryForPath ( path )
123123 if ( repo ) {
124- // TODO: Delete this line
125- await this . dispatcher . refreshRepository ( repo )
124+ await this . dispatcher . loadStatusLight ( repo )
126125 }
127126 return repo ?. login ?? null
128127 }
Original file line number Diff line number Diff line change @@ -414,6 +414,10 @@ export class Dispatcher {
414414 return this . appStore . _refreshOrRecoverRepository ( repository )
415415 }
416416
417+ public async loadStatusLight ( repository : Repository ) : Promise < void > {
418+ await this . appStore . _loadStatusLight ( repository )
419+ }
420+
417421 /**
418422 * Refresh the commit author of a repository. Required after changing git's
419423 * user name or email address.
You can’t perform that action at this time.
0 commit comments