mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 05:05:00 +00:00
style: add .editorconfig for code formatting. see issu #25
This commit is contained in:
parent
a8eeea4f78
commit
18aaa0a143
225 changed files with 7781 additions and 3911 deletions
|
@ -1,19 +1,23 @@
|
|||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace SourceGit.Commands {
|
||||
public partial class IsBinary : Command {
|
||||
namespace SourceGit.Commands
|
||||
{
|
||||
public partial class IsBinary : Command
|
||||
{
|
||||
[GeneratedRegex(@"^\-\s+\-\s+.*$")]
|
||||
private static partial Regex REG_TEST();
|
||||
|
||||
public IsBinary(string repo, string commit, string path) {
|
||||
public IsBinary(string repo, string commit, string path)
|
||||
{
|
||||
WorkingDirectory = repo;
|
||||
Context = repo;
|
||||
Args = $"diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904 {commit} --numstat -- \"{path}\"";
|
||||
RaiseError = false;
|
||||
}
|
||||
|
||||
public bool Result() {
|
||||
public bool Result()
|
||||
{
|
||||
return REG_TEST().IsMatch(ReadToEnd().StdOut);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue