internal GitCommit(Commit commit) { Sha = commit.Sha; Author = new GitSignature(commit.Author.Email, commit.Author.Name, commit.Author.When); Committer = new GitSignature(commit.Committer.Email, commit.Committer.Name, commit.Committer.When); Message = commit.Message; MessageShort = commit.MessageShort; }
internal GitCommit(Commit commit) { if (commit == null) { throw new ArgumentException("Source commit can't be null.", nameof(commit)); } Sha = commit.Sha; Author = new GitSignature(commit.Author.Email, commit.Author.Name, commit.Author.When); Committer = new GitSignature(commit.Committer.Email, commit.Committer.Name, commit.Committer.When); Message = commit.Message; MessageShort = commit.MessageShort; }
internal GitCommit(Commit commit) { if (commit == null) { throw new ArgumentException("Source commit can't be null.", nameof(commit)); } Sha = commit.Sha; Author = new GitSignature(commit.Author.Email, commit.Author.Name, commit.Author.When); Committer = new GitSignature(commit.Committer.Email, commit.Committer.Name, commit.Committer.When); Message = commit.Message; MessageShort = commit.MessageShort; Parents = commit.Parents.Any() ? commit.Parents.Select(p => new GitCommit(p)).ToList() : new List <GitCommit>(); }