我有这个方法,我从上次提交中获取文件:
static void GetFiles(Tree t, String dir = "")
{
foreach (TreeEntry treeEntry in t)
{
if (treeEntry.TargetType == TreeEntryTargetType.Tree)
{
Tree tr = repo.Lookup<Tree>(treeEntry.Target.Sha);
GetFiles(tr, dir + "/" + treeEntry.Name);
}
else
{
string caminho = dir + "/" + treeEntry.Path;
arquivos.Add(caminho);
}
}
return;
}
Run Code Online (Sandbox Code Playgroud)
我看了一下这个问题,但我是C#的新手并且不明白.
我有这个存储库:
c:/teste
| - octocat.txt
| - parentoctocat.txt
| - /outros
| | - octocatblue.txt
| | - octored.txt
Run Code Online (Sandbox Code Playgroud)
我上次提交修改了这些文件:
c:/teste
| - /outros
| | - octocatblue.txt <- This …Run Code Online (Sandbox Code Playgroud)