File tree Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -413,27 +413,29 @@ export class IsomorphicGit extends GitManager {
413
413
await this . fetch ( ) ;
414
414
const branchInfo = await this . branchInfo ( ) ;
415
415
416
- await this . wrapFS (
416
+ const mergeRes = await this . wrapFS (
417
417
git . merge ( {
418
418
...this . getRepo ( ) ,
419
419
ours : branchInfo . current ,
420
420
theirs : branchInfo . tracking ! ,
421
421
abortOnConflict : false ,
422
422
} )
423
423
) ;
424
- await this . wrapFS (
425
- git . checkout ( {
426
- ...this . getRepo ( ) ,
427
- ref : branchInfo . current ,
428
- onProgress : ( progress ) => {
429
- if ( progressNotice !== undefined ) {
430
- ( progressNotice as any ) . noticeEl . innerText =
431
- this . getProgressText ( "Checkout" , progress ) ;
432
- }
433
- } ,
434
- remote : branchInfo . remote ,
435
- } )
436
- ) ;
424
+ if ( ! mergeRes . alreadyMerged ) {
425
+ await this . wrapFS (
426
+ git . checkout ( {
427
+ ...this . getRepo ( ) ,
428
+ ref : branchInfo . current ,
429
+ onProgress : ( progress ) => {
430
+ if ( progressNotice !== undefined ) {
431
+ ( progressNotice as any ) . noticeEl . innerText =
432
+ this . getProgressText ( "Checkout" , progress ) ;
433
+ }
434
+ } ,
435
+ remote : branchInfo . remote ,
436
+ } )
437
+ ) ;
438
+ }
437
439
progressNotice ?. hide ( ) ;
438
440
439
441
const upstreamCommit = await this . resolveRef ( "HEAD" ) ;
You can’t perform that action at this time.
0 commit comments