internal GitCommit(GitRepository gitCommand, string sha)
 {
     _repo     = gitCommand.ThrowIfNull(nameof(gitCommand));
     Sha       = sha.ThrowIfNullOrEmpty(nameof(sha));
     _fileTree = new AsyncLazy <Dictionary <string, string> >(GetFileTreeAsync);
 }
Esempio n. 2
0
 /// <summary>
 /// Verifies git-credential-manager is installed properly.
 /// </summary>
 /// <returns>
 /// true: Verified, git-credential-manager command executed successfully.
 /// false: The command failed for some reason.
 /// </returns>
 public static async Task <bool> IsGitCredentialManagerInstalledAsync() =>
 (await GitRepository.RunGitCommandAsync(
      "credential-manager version",
      Directory.GetCurrentDirectory(),
      throwOnError: false)) != null;