@@ -198,6 +198,7 @@ export class GitStatus {
198198 getUpstreamStatus ( options : {
199199 empty ?: string ;
200200 expand ?: boolean ;
201+ icons ?: boolean ;
201202 prefix ?: string ;
202203 separator ?: string ;
203204 suffix ?: string ;
@@ -208,18 +209,29 @@ export class GitStatus {
208209 static getUpstreamStatus (
209210 upstream : string | undefined ,
210211 state : { ahead : number ; behind : number } ,
211- options : { empty ?: string ; expand ?: boolean ; prefix ?: string ; separator ?: string ; suffix ?: string } = { } ,
212+ options : {
213+ empty ?: string ;
214+ expand ?: boolean ;
215+ icons ?: boolean ;
216+ prefix ?: string ;
217+ separator ?: string ;
218+ suffix ?: string ;
219+ } = { } ,
212220 ) : string {
213- const { expand = false , prefix = '' , separator = ' ' , suffix = '' } = options ;
221+ const { expand = false , icons = false , prefix = '' , separator = ' ' , suffix = '' } = options ;
214222 if ( upstream == null || ( state . behind === 0 && state . ahead === 0 ) ) return options . empty ?? '' ;
215223
216224 if ( expand ) {
217225 let status = '' ;
218226 if ( state . behind ) {
219- status += `${ Strings . pluralize ( 'commit' , state . behind ) } behind` ;
227+ status += `${ Strings . pluralize ( 'commit' , state . behind , {
228+ infix : icons ? '$(arrow-down) ' : undefined ,
229+ } ) } behind`;
220230 }
221231 if ( state . ahead ) {
222- status += `${ status . length === 0 ? '' : separator } ${ Strings . pluralize ( 'commit' , state . ahead ) } ahead` ;
232+ status += `${ status . length === 0 ? '' : separator } ${ Strings . pluralize ( 'commit' , state . ahead , {
233+ infix : icons ? '$(arrow-up) ' : undefined ,
234+ } ) } ahead`;
223235 if ( suffix . startsWith ( ` ${ upstream . split ( '/' ) [ 0 ] } ` ) ) {
224236 status += ' of' ;
225237 }
0 commit comments