Repository navigation
Push pull fetch progress - #1238
Conversation
| if (behind > 0) { return 'Pull' } | ||
| if (ahead > 0) { return 'Push' } | ||
| return 'Update' | ||
| return 'Fetch' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| .toolbar-button { | ||
| &.push-pull-button { min-width: 200px; } | ||
| &.push-pull-button { width: 230px; } |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
This is ready for review 🎉 |
joshaber
left a comment
There was a problem hiding this comment.
Really nice work 🍯 Just some nits.
|
|
||
| /** Is a push/pull/update in progress? */ | ||
| readonly pushPullInProgress: boolean | ||
| readonly isPushPullFetchInProgress: boolean |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| readonly pushPullFetchProgress: Progress | null | ||
| } | ||
|
|
||
| export type Progress = IGenericProgress |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| /** | ||
| * Base interface containing all the properties that progress events | ||
| * needs to support. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| } | ||
|
|
||
| /** | ||
| * An object describing the progression of a branch checkout operation |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| const otherRemotes = (await getRemotes(repository)) | ||
| .filter(r => r.name !== remote.name) | ||
|
|
||
| // Let's say that a pull takes twice as long as a fetch, |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| import { GitProgressParser } from './git' | ||
|
|
||
| /** | ||
| * Highly approximate (some would say outright inaccurate) division |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| */ | ||
| public constructor(steps: ReadonlyArray<IProgressStep>) { | ||
|
|
||
| if (!steps.length) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| if (behind > 0) { return 'Pull' } | ||
| if (ahead > 0) { return 'Push' } | ||
| return 'Update' | ||
| return 'Fetch' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
🐨 |
Show progress for push pull and fetch.
Fetch
Pull
Push
I've attempted to unify all our progress parsing under a shared scheme. All logic related to progress now resides under the
lib/progressfolder.Fixes #953