Pass a Tree instead of a sha in the LogEntry.

This commit is contained in:
Matt Burke
2014-01-17 18:03:56 -05:00
parent 72480e7154
commit fdbfa6ceaf
4 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -593,7 +593,7 @@ namespace Sep.Git.Tfs.Core
private string[] BuildCommitCommand(LogEntry logEntry)
{
var commitCommand = new List<string> { "commit-tree", logEntry.Tree };
var commitCommand = new List<string> { "commit-tree", logEntry.Tree.Sha };
foreach (var parent in logEntry.CommitParents)
{
commitCommand.Add("-p");
+2 -2
View File
@@ -34,9 +34,9 @@ namespace Sep.Git.Tfs.Core
_treeDefinition.Remove(path);
}
public string GetTree()
public Tree GetTree()
{
return _objectDatabase.CreateTree(_treeDefinition).Sha;
return _objectDatabase.CreateTree(_treeDefinition);
}
}
}
+4 -2
View File
@@ -1,4 +1,6 @@
namespace Sep.Git.Tfs.Core
using LibGit2Sharp;
namespace Sep.Git.Tfs.Core
{
public interface IGitTreeModifier
{
@@ -8,6 +10,6 @@
public interface IGitTreeBuilder : IGitTreeModifier
{
string GetTree();
Tree GetTree();
}
}
+2 -1
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using LibGit2Sharp;
namespace Sep.Git.Tfs.Core
{
@@ -11,7 +12,7 @@ namespace Sep.Git.Tfs.Core
}
public string AuthorName { get; set; }
public string Tree { get; set; }
public Tree Tree { get; set; }
public IList<string> CommitParents { get; private set; }