mirror of
https://github.com/desktop/desktop
synced 2024-09-18 07:32:01 +00:00
Don't attempt to update remote head if pull fails
This commit is contained in:
parent
8461f421dc
commit
7a743489a1
|
@ -4653,21 +4653,18 @@ export class AppStore extends TypedBaseStore<IAppState> {
|
|||
}
|
||||
|
||||
await gitStore.performFailableOperation(
|
||||
() =>
|
||||
pullRepo(repository, account, remote, progress => {
|
||||
async () => {
|
||||
await pullRepo(repository, account, remote, progress => {
|
||||
this.updatePushPullFetchProgress(repository, {
|
||||
...progress,
|
||||
value: progress.value * pullWeight,
|
||||
})
|
||||
}),
|
||||
{
|
||||
gitContext,
|
||||
retryAction,
|
||||
}
|
||||
})
|
||||
await updateRemoteHEAD(repository, account, remote)
|
||||
},
|
||||
{ gitContext, retryAction }
|
||||
)
|
||||
|
||||
await updateRemoteHEAD(repository, account, remote)
|
||||
|
||||
const refreshStartProgress = pullWeight + fetchWeight
|
||||
const refreshTitle = __DARWIN__
|
||||
? 'Refreshing Repository'
|
||||
|
|
|
@ -1060,11 +1060,12 @@ export class GitStore extends BaseStore {
|
|||
repository: this.repository,
|
||||
}
|
||||
await this.performFailableOperation(
|
||||
() => fetchRepo(this.repository, account, remote, progressCallback),
|
||||
async () => {
|
||||
await fetchRepo(this.repository, account, remote, progressCallback)
|
||||
await updateRemoteHEAD(this.repository, account, remote)
|
||||
},
|
||||
{ backgroundTask, retryAction }
|
||||
)
|
||||
|
||||
await updateRemoteHEAD(this.repository, account, remote)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue