csharpdeeb25a2 | 1 | namespace CascadeIDE.Models; |
| 2 | |
| 3 | /// <summary>Строка <c>git status --short</c> для списка в панели Git (путь относительно корня репозитория).</summary> |
| 4 | public sealed class GitStatusRow |
| 5 | { |
| 6 | public string RawLine { get; init; } = ""; |
| 7 | |
| 8 | /// <summary>Путь для <c>git diff --</c> и т.п.; пусто для служебных строк.</summary> |
| 9 | public string RelativePath { get; init; } = ""; |
| 10 | |
| 11 | public bool HasPath => !string.IsNullOrWhiteSpace(RelativePath); |
| 12 | |
| 13 | /// <summary>Неотслеживаемый файл (<c>??</c>).</summary> |
| 14 | public bool IsUntracked { get; init; } |
| 15 | |
| 16 | /// <summary>В индексе есть staged-изменения (первая колонка статуса не пробел).</summary> |
| 17 | public bool HasStagedChanges { get; init; } |
| 18 | |
| 19 | /// <summary>Путь совпадает с записью submodule в <c>.gitmodules</c> (gitlink в родителе).</summary> |
| 20 | public bool IsSubmodulePath { get; init; } |
| 21 | } |
| 22 | |
View only · write via MCP/CIDE