Пример #1
0
        public static async Task Init(string path)
        {
            _ = await CommandEx.ReadLoggedAsync("git", "init --initial-branch=main", path).ConfigureAwait(false);

            _ = await CommandEx.ReadLoggedAsync("git", "config user.email [email protected]", path).ConfigureAwait(false);

            _ = await CommandEx.ReadLoggedAsync("git", "config user.name John Doe", path).ConfigureAwait(false);

            _ = await CommandEx.ReadLoggedAsync("git", "config commit.gpgsign false", path).ConfigureAwait(false);
        }
Пример #2
0
 public static Task Checkout(string path, string sha) =>
 CommandEx.ReadLoggedAsync("git", $"checkout {sha}", path);
Пример #3
0
 public static async Task <IEnumerable <string> > GetCommitShas(string path) =>
 (await CommandEx.ReadLoggedAsync("git", "log --pretty=format:\"%H\"", path).ConfigureAwait(false)).StandardOutput.Split('\r', '\n');
Пример #4
0
 public static Task AnnotatedTag(string path, string tag, string message) =>
 CommandEx.ReadLoggedAsync("git", $"tag {tag} -a -m '{message}'", path);
Пример #5
0
 public static Task Tag(string path, string tag, string sha) =>
 CommandEx.ReadLoggedAsync("git", $"tag {tag} {sha}", path);
Пример #6
0
 public static async Task <string> GetGraph(string path) =>
 (await CommandEx.ReadLoggedAsync("git", "log --graph --pretty=format:'%d'", path).ConfigureAwait(false)).StandardOutput;
Пример #7
0
 public static Task Commit(string path) =>
 CommandEx.ReadLoggedAsync("git", "commit -m '.' --allow-empty", path);