当前位置: 首页>>代码示例>>C#>>正文


C# Repository.FindLastChangingCommit方法代码示例

本文整理汇总了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);
            }
开发者ID:GitNinja,项目名称:GitNinja.Gallery,代码行数:8,代码来源:RepositoryExtensionsTests.cs

示例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);
            }
开发者ID:GitNinja,项目名称:GitNinja.Gallery,代码行数:8,代码来源:RepositoryExtensionsTests.cs

示例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"));
            }
开发者ID:GitNinja,项目名称:GitNinja.Gallery,代码行数:15,代码来源:RepositoryExtensionsTests.cs

示例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"));
            }
开发者ID:GitNinja,项目名称:GitNinja.Gallery,代码行数:15,代码来源:RepositoryExtensionsTests.cs

示例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"));
            }
开发者ID:GitNinja,项目名称:GitNinja.Gallery,代码行数:15,代码来源:RepositoryExtensionsTests.cs


注:本文中的LibGit2Sharp.Repository.FindLastChangingCommit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。