enhance: show untracked submodules in unstaged (#393)

This commit is contained in:
leo 2024-08-22 14:10:32 +08:00
parent d5e51d1f32
commit 8b469e7778
No known key found for this signature in database
2 changed files with 8 additions and 2 deletions

View file

@ -28,8 +28,6 @@ namespace SourceGit.Commands
var match = REG_FORMAT().Match(line); var match = REG_FORMAT().Match(line);
if (!match.Success) if (!match.Success)
return; return;
if (line.EndsWith("/", StringComparison.Ordinal))
return; // Ignore changes with git-worktree
var change = new Models.Change() { Path = match.Groups[2].Value }; var change = new Models.Change() { Path = match.Groups[2].Value };
var status = match.Groups[1].Value; var status = match.Groups[1].Value;

View file

@ -87,6 +87,14 @@ namespace SourceGit.ViewModels
private void LoadDiffContent() private void LoadDiffContent()
{ {
if (_option.Path.EndsWith('/'))
{
Content = null;
IsTextDiff = false;
IsLoading = false;
return;
}
var unified = Preference.Instance.DiffViewVisualLineNumbers; var unified = Preference.Instance.DiffViewVisualLineNumbers;
Task.Run(() => Task.Run(() =>
{ {