File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -90,9 +90,23 @@ export class GitStatus {
9090 return `${ prefix } ${ status } ${ suffix } ` ;
9191 }
9292
93- return `${ prefix } ${ compact && added === 0 ? '' : `+${ added } ${ separator } ` } ${
94- compact && changed === 0 ? '' : `~${ changed } ${ separator } `
95- } ${ compact && deleted === 0 ? '' : `-${ deleted } ` } ${ suffix } `;
93+ let status = '' ;
94+ if ( compact ) {
95+ if ( added !== 0 ) {
96+ status += `+${ added } ` ;
97+ }
98+ if ( changed !== 0 ) {
99+ status += `${ status . length === 0 ? '' : separator } ~${ changed } ` ;
100+ }
101+ if ( deleted !== 0 ) {
102+ status += `${ status . length === 0 ? '' : separator } -${ deleted } ` ;
103+ }
104+ }
105+ else {
106+ status += `+${ added } ${ separator } ~${ changed } ${ separator } -${ deleted } ` ;
107+ }
108+
109+ return `${ prefix } ${ status } ${ suffix } ` ;
96110 }
97111
98112 getUpstreamStatus ( options : {
You can’t perform that action at this time.
0 commit comments