本文整理汇总了C#中LibGit2Sharp.Repository.FindLastChangingCommit方法的典型用法代码示例。如果您正苦于以下问题:C# Repository.FindLastChangingCommit方法的具体用法?C# Repository.FindLastChangingCommit怎么用?C# Repository.FindLastChangingCommit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LibGit2Sharp.Repository
的用法示例。
在下文中一共展示了Repository.FindLastChangingCommit方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Returns_Null_If_Path_Not_In_Tree
public void Returns_Null_If_Path_Not_In_Tree()
{
var repo = new Repository(PathToSimpleRepository);
var commit = repo.FindLastChangingCommit(null, "non-existing-directory");
Assert.That(commit, Is.Null);
}
示例2: Returns_Null_If_Repository_Has_No_Commits
public void Returns_Null_If_Repository_Has_No_Commits()
{
var repo = new Repository(PathToBareRepository);
var commit = repo.FindLastChangingCommit(null, "");
Assert.That(commit, Is.Null);
}
示例3: Returns_Tip_If_It_Was_The_Last_Change
public void Returns_Tip_If_It_Was_The_Last_Change()
{
var repo = new Repository(PathToSimpleRepository);
var commit = repo.FindLastChangingCommit(null, "first-level-directory/second-level-directory/third-file.txt");
/*
* Commit expected
* Sha: 061b35ca18c50a38e368bfaf6ece0fef475ab0c8
* Author: tjdecke <[email protected]>
* Date: Sun Apr 14 16:15:38 2013 +0100
* added second-level-directory and third-file.txt
*/
Assert.That(commit.Sha, Is.EqualTo("061b35ca18c50a38e368bfaf6ece0fef475ab0c8"));
}
示例4: Returns_Rename_Commit_For_Renamed_Files
public void Returns_Rename_Commit_For_Renamed_Files()
{
var repo = new Repository(PathToSimpleRepository);
var commit = repo.FindLastChangingCommit(null, "first-level-directory/second-renamed-file.txt");
/*
* Commit expected
* Sha: 225b729865a3d2c70db5ffecdb53e95eb870b3fe
* Author: tjdecke <[email protected]>
* Date: Sun Apr 14 16:16:53 2013 +0100
* renamed second-file.txt to second-renamed-file.txt
*/
Assert.That(commit.Sha, Is.EqualTo("225b729865a3d2c70db5ffecdb53e95eb870b3fe"));
}
示例5: Returns_Latest_Commit_For_Changed_Files
public void Returns_Latest_Commit_For_Changed_Files()
{
var repo = new Repository(PathToSimpleRepository);
var commit = repo.FindLastChangingCommit(null, "first-level-directory/first-file.txt");
/*
* Commit expected
* Sha: 59fa440f92e4f8f812fb22c227ac484a517029cd
* Author: tjdecke <[email protected]>
* Date: Sun Apr 14 16:14:56 2013 +0100
* changed first-file.txt
*/
Assert.That(commit.Id.Sha, Is.EqualTo("59fa440f92e4f8f812fb22c227ac484a517029cd"));
}