Kudu.Core.SourceControl.Git.LibGit2SharpRepository.Commit C# (CSharp) Метод

Commit() публичный Метод

public Commit ( string message, string authorName, string emailAddress ) : bool
message string
authorName string
emailAddress string
Результат bool
        public bool Commit(string message, string authorName, string emailAddress)
        {
            using (var repo = new LibGit2Sharp.Repository(RepositoryPath))
            {
                var changes = repo.RetrieveStatus(new StatusOptions
                {
                    DetectRenamesInIndex = false,
                    DetectRenamesInWorkDir = false
                }).Select(c => c.FilePath);

                if (!changes.Any())
                {
                    return false;
                }

                repo.Stage(changes);
                if (string.IsNullOrWhiteSpace(authorName) ||
                    string.IsNullOrWhiteSpace(emailAddress))
                {
                    repo.Commit(message);
                }
                else
                {
                    repo.Commit(message, new Signature(authorName, emailAddress, DateTimeOffset.UtcNow));
                }
                return true;
            }
        }