892
return [];
893
}
895
>
const seen = new Set<string>();
896
>
const addPath = (path: string) => {
897
>
if (path && !seen.has(path)) {
898
>
seen.add(path);
899
>
result.push(path);
900
>
}
901
>
};
902
>
const segments = output.split('\x00');
903
>
for (let i = 0; i < segments.length; i++) {
904
>
const seg = segments[i];
905
>
if (!seg) { continue; }
906
>
// Each entry is "XY <path>"; for renames v1 emits a second NUL-separated
907
>
// "from" path.
908
>
const status = seg.substring(0, 2);
909
>
const path = seg.substring(3);
910
>
const isRenameOrCopy = status[0] === 'R' || status[1] === 'R' || status[0] === 'C' || status[1] === 'C';
911
>
if (includeStatus(status)) {
912
>
addPath(path);
913
>
if (isRenameOrCopy) {
914
const sourcePath = segments[++i];
915
if (sourcePath) {