@@ -193,7 +193,7 @@ export class StatusGitSubProvider implements GitStatusSubProvider {
193193 stepsTotalResult ,
194194 stepsMessageResult ,
195195 ] = await Promise . allSettled ( [
196- await this . git . exec < string > (
196+ this . git . exec < string > (
197197 { cwd : repoPath , errors : GitErrorHandling . Ignore } ,
198198 'rev-parse' ,
199199 '--quiet' ,
@@ -213,26 +213,24 @@ export class StatusGitSubProvider implements GitStatusSubProvider {
213213 const onto = getSettledValue ( ontoResult ) ;
214214 if ( origHead == null || onto == null ) return undefined ;
215215
216- let mergeBase ;
217- const rebaseHead = getSettledValue ( rebaseHeadResult ) ;
218- if ( rebaseHead != null ) {
219- mergeBase = await this . provider . branches . getMergeBase ( repoPath , rebaseHead , 'HEAD' ) ;
220- } else {
221- mergeBase = await this . provider . branches . getMergeBase ( repoPath , onto , origHead ) ;
222- }
216+ const rebaseHead = getSettledValue ( rebaseHeadResult ) ?. trim ( ) ;
223217
224218 if ( branch . startsWith ( 'refs/heads/' ) ) {
225219 branch = branch . substring ( 11 ) . trim ( ) ;
226220 }
227221
228- const [ branchTipsResult , tagTipsResult ] = await Promise . allSettled ( [
222+ const [ mergeBaseResult , branchTipsResult , tagTipsResult ] = await Promise . allSettled ( [
223+ rebaseHead != null
224+ ? this . provider . branches . getMergeBase ( repoPath , rebaseHead , 'HEAD' )
225+ : this . provider . branches . getMergeBase ( repoPath , onto , origHead ) ,
229226 this . provider . branches . getBranchesForCommit ( repoPath , [ onto ] , undefined , {
230227 all : true ,
231228 mode : 'pointsAt' ,
232229 } ) ,
233230 this . provider . getCommitTags ( repoPath , onto , { mode : 'pointsAt' } ) ,
234231 ] ) ;
235232
233+ const mergeBase = getSettledValue ( mergeBaseResult ) ;
236234 const branchTips = getSettledValue ( branchTipsResult ) ;
237235 const tagTips = getSettledValue ( tagTipsResult ) ;
238236
0 commit comments