From cfbb50a4f2ceaee209f0967c9e112d26d3a4a009 Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Tue, 24 Sep 2013 15:03:53 +0100 Subject: [PATCH] Print bootstrap information directly from the identified commit. Emit the commit information using the same style as git log but avoiding the cost of executing a git subprocess. Signed-off-by: Pat Thoyts --- GitTfs/Commands/Bootstrap.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/GitTfs/Commands/Bootstrap.cs b/GitTfs/Commands/Bootstrap.cs index 676ff643..2946cc67 100644 --- a/GitTfs/Commands/Bootstrap.cs +++ b/GitTfs/Commands/Bootstrap.cs @@ -40,7 +40,12 @@ namespace Sep.Git.Tfs.Commands var tfsParents = _globals.Repository.GetLastParentTfsCommits(commitish, true); foreach (var parent in tfsParents) { - _globals.Repository.CommandNoisy("log", "-1", parent.GitCommit); + GitCommit commit = _globals.Repository.GetCommit(parent.GitCommit); + _stdout.WriteLine("commit {0}\nAuthor: {1} <{2}>\nDate: {3}\n\n {4}", + commit.Sha, + commit.AuthorAndEmail.Item1, commit.AuthorAndEmail.Item2, + commit.When.ToString("ddd MMM d HH:mm:ss zzz"), + commit.Message.Replace("\n","\n ").TrimEnd(' ')); if (parent.Remote.IsDerived) { var remoteId = GetRemoteId(parent);