Pass a Tree instead of a sha in the LogEntry.
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user