diff --git a/public/index.html b/public/index.html index b74737d..1028666 100644 --- a/public/index.html +++ b/public/index.html @@ -866,10 +866,17 @@ } function getFileClass(status) { - if (status === 'M') return 'git-file-modified'; - if (status === 'A') return 'git-file-added'; - if (status === 'D') return 'git-file-deleted'; - if (status === '??') return 'git-file-untracked'; + // Git status is two characters: index status + working tree status + // Check first non-space character for primary classification + const char = status.trim()[0] || ''; + if (char === 'M') return 'git-file-modified'; + if (char === 'A') return 'git-file-added'; + if (char === 'D') return 'git-file-deleted'; + if (char === 'R') return 'git-file-modified'; // Renamed treated as modified + if (char === 'C') return 'git-file-added'; // Copied treated as added + if (char === 'U') return 'git-file-modified'; // Unmerged treated as modified + if (char === '?') return 'git-file-untracked'; + if (char === '!') return 'git-file-untracked'; // Ignored return ''; }