Use LibGit2Sharp.Mode in place of strings.
This commit is contained in:
@@ -24,9 +24,9 @@ namespace Sep.Git.Tfs.Core
|
||||
_objectDatabase = objectDatabase;
|
||||
}
|
||||
|
||||
public void Add(string path, string file, string mode)
|
||||
public void Add(string path, string file, LibGit2Sharp.Mode mode)
|
||||
{
|
||||
_treeDefinition.Add(path, file, Mode.ToFileMode(mode));
|
||||
_treeDefinition.Add(path, file, mode);
|
||||
}
|
||||
|
||||
public void Remove(string path)
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Sep.Git.Tfs.Core
|
||||
namespace Sep.Git.Tfs.Core
|
||||
{
|
||||
public interface IGitTreeBuilder
|
||||
{
|
||||
void Add(string path, string file, string mode);
|
||||
void Add(string path, string file, LibGit2Sharp.Mode mode);
|
||||
void Remove(string path);
|
||||
string GetTree();
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Sep.Git.Tfs.Core
|
||||
|
||||
private void Update(ApplicableChange change, IGitTreeBuilder treeBuilder, ITfsWorkspace workspace, IDictionary<string, GitObject> initialTree)
|
||||
{
|
||||
treeBuilder.Add(change.GitPath, workspace.GetLocalPath(change.GitPath), change.Mode.ToModeString());
|
||||
treeBuilder.Add(change.GitPath, workspace.GetLocalPath(change.GitPath), change.Mode);
|
||||
}
|
||||
|
||||
public IEnumerable<TfsTreeEntry> GetTree()
|
||||
@@ -126,7 +126,7 @@ namespace Sep.Git.Tfs.Core
|
||||
{
|
||||
if (item.DeletionId == 0)
|
||||
{
|
||||
treeBuilder.Add(pathInGitRepo, workspace.GetLocalPath(pathInGitRepo), Mode.NewFile);
|
||||
treeBuilder.Add(pathInGitRepo, workspace.GetLocalPath(pathInGitRepo), LibGit2Sharp.Mode.NonExecutableFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user