mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
feat: show git file mode change if exist
This commit is contained in:
parent
2d5e048797
commit
a249eed1ac
7 changed files with 61 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using SourceGit.Models;
|
||||
|
||||
namespace SourceGit.Commands
|
||||
{
|
||||
|
@ -46,6 +47,22 @@ namespace SourceGit.Commands
|
|||
|
||||
protected override void OnReadline(string line)
|
||||
{
|
||||
if (line.StartsWith("old mode ", StringComparison.Ordinal))
|
||||
{
|
||||
_result.FileModeDiff ??= new FileModeDiff();
|
||||
|
||||
_result.FileModeDiff.Old = line.Substring(9);
|
||||
return;
|
||||
}
|
||||
|
||||
if (line.StartsWith("new mode ", StringComparison.Ordinal))
|
||||
{
|
||||
_result.FileModeDiff ??= new FileModeDiff();
|
||||
|
||||
_result.FileModeDiff.New = line.Substring(9);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_result.IsBinary)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue