@@ -18,7 +18,7 @@ public static class Git
18
18
public static string GitPath => "/usr/local/bin/git" ;
19
19
#endif
20
20
21
- private static Task < Process > GenerateProcess ( string path , string arguments )
21
+ private static Task < Process > GenerateProcessAsync ( string path , string arguments )
22
22
{
23
23
24
24
return Task . Run ( ( ) => Process . Start ( new ProcessStartInfo
@@ -36,7 +36,7 @@ private static Task<Process> GenerateProcess(string path, string arguments)
36
36
public static async Task < string > Branch ( )
37
37
{
38
38
39
- var process = await GenerateProcess ( GitPath , "rev-parse --abbrev-ref HEAD" ) ;
39
+ var process = await GenerateProcessAsync ( GitPath , "rev-parse --abbrev-ref HEAD" ) ;
40
40
41
41
return process ? . StandardOutput . ReadLine ( ) ;
42
42
@@ -45,7 +45,7 @@ public static async Task<string> Branch()
45
45
public static async Task < string [ ] > Branches ( )
46
46
{
47
47
48
- var process = await GenerateProcess ( GitPath , "for-each-ref --format='%(refname:short)' refs/heads" ) ;
48
+ var process = await GenerateProcessAsync ( GitPath , "for-each-ref --format='%(refname:short)' refs/heads" ) ;
49
49
50
50
var branches = new List < string > ( ) ;
51
51
@@ -63,7 +63,7 @@ public static async Task<string[]> Branches()
63
63
public static async Task < string [ ] > ChangedFiles ( )
64
64
{
65
65
66
- var process = await GenerateProcess ( GitPath , "status --short --untracked-files=no --porcelain" ) ;
66
+ var process = await GenerateProcessAsync ( GitPath , "status --short --untracked-files=no --porcelain" ) ;
67
67
68
68
var changes = new List < string > ( ) ;
69
69
@@ -81,14 +81,14 @@ public static async Task<string[]> ChangedFiles()
81
81
public static async Task CheckoutBranch ( string branch )
82
82
{
83
83
84
- await GenerateProcess ( GitPath , $ "checkout { branch } ") ;
84
+ await GenerateProcessAsync ( GitPath , $ "checkout { branch } ") ;
85
85
86
86
}
87
87
88
88
public static async Task DiscardChanges ( string path )
89
89
{
90
90
91
- var process = await GenerateProcess ( GitPath , $@ "checkout ""{ path } """);
91
+ var process = await GenerateProcessAsync ( GitPath , $@ "checkout ""{ path } """);
92
92
93
93
if (process?.StandardError.ReadLine() is string line && line.StartsWith(" error: pathspec") )
94
94
{
@@ -102,14 +102,14 @@ public static async Task DiscardChanges(string path)
102
102
public static async Task Init ( )
103
103
{
104
104
105
- await GenerateProcess ( GitPath , "init" ) ;
105
+ await GenerateProcessAsync ( GitPath , "init" ) ;
106
106
107
107
}
108
108
109
109
public static async Task < string > Status ( )
110
110
{
111
111
112
- var process = await GenerateProcess ( GitPath , "status" ) ;
112
+ var process = await GenerateProcessAsync ( GitPath , "status" ) ;
113
113
114
114
if ( process ? . StandardError . ReadLine ( ) is string line && line . StartsWith ( "fatal: not a git repository" ) )
115
115
{
@@ -125,7 +125,7 @@ public static async Task<string> Status()
125
125
public static async Task < string [ ] > UntrackedFiles ( )
126
126
{
127
127
128
- var process = await GenerateProcess ( GitPath , "ls-files --others --exclude-standard" ) ;
128
+ var process = await GenerateProcessAsync ( GitPath , "ls-files --others --exclude-standard" ) ;
129
129
130
130
var changes = new List < string > ( ) ;
131
131
0 commit comments