private void ProcessAuthor(CheckinOptions checkinOptions, TextWriter writer, GitCommit commit) { if (checkinOptions.AuthorsFilePath == null) { writer.WriteLine("Author file was not set."); return; } // get authors file FIXME AuthorsFile af = new AuthorsFile(); TextReader tr = new StreamReader(checkinOptions.AuthorsFilePath); af.Parse(tr); Author a = af.FindAuthor(commit.AuthorAndEmail); if (a == null) { checkinOptions.AuthorTfsUserId = null; return; } checkinOptions.AuthorTfsUserId = a.TfsUserId; writer.WriteLine("Commit was authored by git user {0} {1} ({2})", a.Name, a.Email, a.TfsUserId); }
public static void ProcessAuthor(this CheckinOptions checkinOptions, GitCommit commit, AuthorsFile authors) { if (!authors.IsParseSuccessfull) return; Author a = authors.FindAuthor(commit.AuthorAndEmail); if (a == null) { checkinOptions.AuthorTfsUserId = null; return; } checkinOptions.AuthorTfsUserId = a.TfsUserId; Trace.TraceInformation("Commit was authored by git user {0} {1} ({2})", a.Name, a.Email, a.TfsUserId); }
public static void ProcessAuthor(this CheckinOptions checkinOptions, TextWriter writer, GitCommit commit, AuthorsFile authors) { if (!authors.IsParseSuccessfull) { return; } Author a = authors.FindAuthor(commit.AuthorAndEmail); if (a == null) { checkinOptions.AuthorTfsUserId = null; return; } checkinOptions.AuthorTfsUserId = a.TfsUserId; writer.WriteLine("Commit was authored by git user {0} {1} ({2})", a.Name, a.Email, a.TfsUserId); }
private void ProcessAuthor(CheckinOptions checkinOptions, TextWriter writer, GitCommit commit) { // get authors file FIXME AuthorsFile af = new AuthorsFile(); if (!af.Parse(checkinOptions.AuthorsFilePath, globals.GitDir)) { return; } Author a = af.FindAuthor(commit.AuthorAndEmail); if (a == null) { checkinOptions.AuthorTfsUserId = null; return; } checkinOptions.AuthorTfsUserId = a.TfsUserId; writer.WriteLine("Commit was authored by git user {0} {1} ({2})", a.Name, a.Email, a.TfsUserId); }
private void ProcessAuthor(CheckinOptions checkinOptions, TextWriter writer, GitCommit commit) { // get authors file FIXME AuthorsFile af = new AuthorsFile(); if (!af.Parse(checkinOptions.AuthorsFilePath, globals.GitDir)) return; Author a = af.FindAuthor(commit.AuthorAndEmail); if (a == null) { checkinOptions.AuthorTfsUserId = null; return; } checkinOptions.AuthorTfsUserId = a.TfsUserId; writer.WriteLine("Commit was authored by git user {0} {1} ({2})", a.Name, a.Email, a.TfsUserId); }