feature<Watcher>: sync changes for git-worktrees

This commit is contained in:
leo 2021-06-30 15:09:18 +08:00
parent ee4aa052d2
commit 2ddc61e162
2 changed files with 5 additions and 2 deletions

View file

@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
@ -22,6 +23,7 @@ namespace SourceGit.Commands {
public override void OnReadline(string line) {
var match = REG_FORMAT.Match(line);
if (!match.Success) return;
if (line.EndsWith("/", StringComparison.Ordinal)) return; // Ignore changes with git-worktree
var change = new Models.Change() { Path = match.Groups[2].Value };
var status = match.Groups[1].Value;