feature: supports searching revision files (#775)

This commit is contained in:
leo 2024-12-02 21:44:15 +08:00
parent 536f225867
commit 894f3e9b03
No known key found for this signature in database
10 changed files with 350 additions and 15 deletions

View file

@ -1,21 +0,0 @@
namespace SourceGit.Commands
{
public class QueryCurrentRevisionFiles : Command
{
public QueryCurrentRevisionFiles(string repo)
{
WorkingDirectory = repo;
Context = repo;
Args = "ls-tree -r --name-only HEAD";
}
public string[] Result()
{
var rs = ReadToEnd();
if (rs.IsSuccess)
return rs.StdOut.Split('\n', System.StringSplitOptions.RemoveEmptyEntries);
return [];
}
}
}