File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5801,7 +5801,10 @@ export class AppStore extends TypedBaseStore<IAppState> {
58015801 }
58025802
58035803 /** This shouldn't be called directly. See `Dispatcher`. */
5804- private async performPull ( repository : Repository ) : Promise < void > {
5804+ private async performPull (
5805+ repository : Repository ,
5806+ allowRetry = true
5807+ ) : Promise < void > {
58055808 return this . withPushPullFetch ( repository , async ( ) => {
58065809 const gitStore = this . gitStoreCache . get ( repository )
58075810
@@ -5826,6 +5829,14 @@ export class AppStore extends TypedBaseStore<IAppState> {
58265829 throw new Error ( 'The current repository is in a detached HEAD state.' )
58275830 }
58285831
5832+ if ( tip . kind === TipState . Unknown && allowRetry ) {
5833+ console . warn (
5834+ `Repo ${ repository . name } was in an unknown state (not loaded) when trying to pull. Refreshing repository and trying again.`
5835+ )
5836+ await this . _refreshRepository ( repository )
5837+ return this . performPull ( repository , false )
5838+ }
5839+
58295840 if ( tip . kind === TipState . Valid ) {
58305841 let mergeBase : string | null = null
58315842 let gitContext : GitErrorContext | undefined = undefined
You can’t perform that action at this time.
0 commit comments