Exemple #1
0
        public void Pull_Branch_OnlyPullsThatBranch()
        {
            WriteTextFileAndCommit(Repo1, "test1.txt", "initial contents", "initial commit", true);
            Repo2.Pull(Repo1.Path);

            Repo1.Branch("newbranch");
            WriteTextFileAndCommit(Repo1, "test2.txt", "initial contents", "2nd commit", true);
            Repo1.Update(0);
            WriteTextFileAndCommit(Repo1, "test3.txt", "initial contents", "3rd commit", true);

            Changeset[] log = Repo2.Log().ToArray();
            Assert.That(log.Length, Is.EqualTo(1));

            Repo2.Pull(
                Repo1.Path, new PullCommand
            {
                Branches =
                {
                    "newbranch",
                },
            });
            log = Repo2.Log().ToArray();
            Assert.That(log.Length, Is.EqualTo(2));
        }