mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
27 lines
725 B
C#
27 lines
725 B
C#
namespace SourceGit.Commands
|
|
{
|
|
public class IsLFSFiltered : Command
|
|
{
|
|
public IsLFSFiltered(string repo, string path)
|
|
{
|
|
WorkingDirectory = repo;
|
|
Context = repo;
|
|
Args = $"check-attr -z filter \"{path}\"";
|
|
RaiseError = false;
|
|
}
|
|
|
|
public IsLFSFiltered(string repo, string sha, string path)
|
|
{
|
|
WorkingDirectory = repo;
|
|
Context = repo;
|
|
Args = $"check-attr --source {sha} -z filter \"{path}\"";
|
|
RaiseError = false;
|
|
}
|
|
|
|
public bool Result()
|
|
{
|
|
var rs = ReadToEnd();
|
|
return rs.IsSuccess && rs.StdOut.Contains("filter\0lfs");
|
|
}
|
|
}
|
|
}
|