mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
22 lines
524 B
C#
22 lines
524 B
C#
|
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 [];
|
|||
|
}
|
|||
|
}
|
|||
|
}
|