mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 05:05:00 +00:00
feature: add auto complete box for searching commits by file path
This commit is contained in:
parent
addfb449cc
commit
7f8b8a19a0
4 changed files with 235 additions and 35 deletions
21
src/Commands/QueryCurrentRevisionFiles.cs
Normal file
21
src/Commands/QueryCurrentRevisionFiles.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
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 [];
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue