Bladeren bron

Fixes untracked files not showing working status

main
Eric Amodio 3 jaren geleden
bovenliggende
commit
1d9eb89aa9
2 gewijzigde bestanden met toevoegingen van 2 en 3 verwijderingen
  1. +1
    -2
      src/git/formatters/statusFormatter.ts
  2. +1
    -1
      src/git/parsers/statusParser.ts

+ 1
- 2
src/git/formatters/statusFormatter.ts Bestand weergeven

@ -62,8 +62,7 @@ export class StatusFileFormatter extends Formatter
}
get working() {
const commit = (this._item as GitFileWithCommit).commit;
const statusFile = commit === undefined ? this._item : commit.files[0];
const statusFile = (this._item as GitFileWithCommit).commit?.files?.[0] ?? this._item;
let icon;
if (statusFile.workingTreeStatus !== undefined && statusFile.indexStatus !== undefined) {

+ 1
- 1
src/git/parsers/statusParser.ts Bestand weergeven

@ -109,7 +109,7 @@ export class GitStatusParser {
files.push(this.parseStatusFile(repoPath, lineParts[1], lineParts.slice(10).join(' ')));
break;
case '?': // untracked
files.push(this.parseStatusFile(repoPath, ' ?', lineParts.slice(1).join(' ')));
files.push(this.parseStatusFile(repoPath, '??', lineParts.slice(1).join(' ')));
break;
}
}

Laden…
Annuleren
Opslaan