code_style: remove unnecessary namespace using

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-06-18 14:27:39 +08:00
parent 3ac803d88c
commit 2d91fed05e
No known key found for this signature in database

View file

@ -19,7 +19,7 @@ namespace SourceGit.Commands
if (!rs.IsSuccess)
return outs;
var items = rs.StdOut.Split('\0', System.StringSplitOptions.RemoveEmptyEntries);
var items = rs.StdOut.Split('\0', StringSplitOptions.RemoveEmptyEntries);
foreach (var item in items)
{
var current = new Models.Stash();
@ -37,7 +37,8 @@ namespace SourceGit.Commands
current.SHA = line;
break;
case 1:
ParseParent(line, ref current);
if (line.Length > 6)
current.Parents.AddRange(line.Split(' ', StringSplitOptions.RemoveEmptyEntries));
break;
case 2:
current.Time = ulong.Parse(line);
@ -63,13 +64,5 @@ namespace SourceGit.Commands
}
return outs;
}
private void ParseParent(string data, ref Models.Stash current)
{
if (data.Length < 8)
return;
current.Parents.AddRange(data.Split(separator: ' ', options: StringSplitOptions.RemoveEmptyEntries));
}
}
}