We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7efbef6 commit c49a82eCopy full SHA for c49a82e
Assets/Plugins/CandyCoded.GitStatus/Scripts/CustomEditor/Git.cs
@@ -99,6 +99,29 @@ public static async Task DiscardChanges(string path)
99
100
}
101
102
+ public static async Task Init()
103
+ {
104
+
105
+ await GenerateProcess(GitPath, "init");
106
107
+ }
108
109
+ public static async Task<string> Status()
110
111
112
+ var process = await GenerateProcess(GitPath, "status");
113
114
+ if (process?.StandardError.ReadLine() is string line && line.StartsWith("fatal: not a git repository"))
115
116
117
+ throw new Exception("Path is not a git repository.");
118
119
120
121
+ return process?.StandardOutput.ReadToEnd();
122
123
124
125
public static async Task<string[]> UntrackedFiles()
126
{
127
0 commit comments