Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix issue #123 #126

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+3 −3
Split
@@ -242,7 +242,7 @@ private List<TfsChangesetInfo> GetParentTfsCommits(string head, bool includeStub
try
{
CommandOutputPipe(stdout => FindTfsCommits(stdout, tfsCommits, includeStubRemotes),
- "log", "--no-color", "--pretty=medium", head);
+ "log", "--no-color", @"--pretty=format:'commit %H%n%b'", head );
@spraints

spraints Jan 26, 2012

Owner

Can you change the format to 'commit %H%n%B'? It's not a big difference, but it gets git to dump the raw commit body. It seems like this will be more foolproof.

@chrisbroome

chrisbroome Jan 26, 2012

Yeah I'll change it to yours and push it up.

}
catch (GitCommandException e)
{
@@ -260,7 +260,7 @@ private void FindTfsCommits(TextReader stdout, ICollection<TfsChangesetInfo> tfs
var match = GitTfsConstants.CommitRegex.Match(line);
if (match.Success)
{
- currentCommit = match.Groups[1].Value;
+ currentCommit = match.Groups["commit"].Value;
continue;
}
var changesetInfo = TryParseChangesetInfo(line, currentCommit, includeStubRemotes);
@@ -6,7 +6,7 @@ public static class GitTfsConstants
{
public static readonly Regex Sha1 = new Regex("[a-f\\d]{40}", RegexOptions.IgnoreCase);
public static readonly Regex Sha1Short = new Regex("[a-f\\d]{4,40}", RegexOptions.IgnoreCase);
- public static readonly Regex CommitRegex = new Regex("^commit (" + Sha1 + ")\\s*$");
+ public static readonly Regex CommitRegex = new Regex(string.Concat(@"^commit (?<commit>", Sha1, @")"), RegexOptions.Compiled);
public const string DefaultRepositoryId = "default";