Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/git/GitCli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -658,9 +658,18 @@ export function status(type = null) {
const statusArr = [];
let file = line.substring(3);

let display = file;
const io = file.indexOf("->");
if (io !== -1) {
file = file.substring(io + 2).trim();
}

// check if the file is quoted
if (_isquoted(file)) {
file = _unquote(file);
if (io === -1) {
display = file;
}
if (_isescaped(file)) {
isEscaped = true;
}
Expand Down Expand Up @@ -712,12 +721,6 @@ export function status(type = null) {
throw new Error("Unexpected status: " + statusChar);
}

let display = file;
const io = file.indexOf("->");
if (io !== -1) {
file = file.substring(io + 2).trim();
}

// we don't want to display paths that lead to this file outside the project
if (currentSubFolder && display.indexOf(currentSubFolder) === 0) {
display = display.substring(currentSubFolder.length);
Expand Down