Skip to content

Commit 8c48d39

Browse files
TherzokEdward Thomson
authored andcommitted
Update libgit2 to 4eb97ef
libgit2/libgit2@3f8d005...4eb97ef
1 parent 090c6e9 commit 8c48d39

23 files changed

+77
-66
lines changed
-963 KB
Binary file not shown.
968 KB
Binary file not shown.
-730 KB
Binary file not shown.
733 KB
Binary file not shown.

LibGit2Sharp.Tests/BranchFixture.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ public void CreatingABranchFromANonCommitObjectThrows()
241241
using (var repo = new Repository(BareTestRepoPath))
242242
{
243243
const string name = "sorry-dude-i-do-not-do-blobs-nor-trees";
244-
Assert.Throws<LibGit2SharpException>(() => repo.CreateBranch(name, "refs/tags/point_to_blob"));
245-
Assert.Throws<LibGit2SharpException>(() => repo.CreateBranch(name, "53fc32d"));
246-
Assert.Throws<LibGit2SharpException>(() => repo.CreateBranch(name, "0266163"));
244+
Assert.Throws<InvalidSpecificationException>(() => repo.CreateBranch(name, "refs/tags/point_to_blob"));
245+
Assert.Throws<InvalidSpecificationException>(() => repo.CreateBranch(name, "53fc32d"));
246+
Assert.Throws<InvalidSpecificationException>(() => repo.CreateBranch(name, "0266163"));
247247
}
248248
}
249249

LibGit2Sharp.Tests/FetchFixture.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,18 @@ public void CanFetchAllTagsIntoAnEmptyRepository(string url)
8080
TestRemoteInfo remoteInfo = TestRemoteInfo.TestRemoteInstance;
8181
var expectedFetchState = new ExpectedFetchState(remoteName);
8282

83-
// Add expected tags only as no branches are expected to be fetched
83+
// Add expected tags
8484
foreach (KeyValuePair<string, TestRemoteInfo.ExpectedTagInfo> kvp in remoteInfo.Tags)
8585
{
8686
expectedFetchState.AddExpectedTag(kvp.Key, ObjectId.Zero, kvp.Value);
8787
}
8888

89+
// Add expected branch objects
90+
foreach (KeyValuePair<string, ObjectId> kvp in remoteInfo.BranchTips)
91+
{
92+
expectedFetchState.AddExpectedBranch(kvp.Key, ObjectId.Zero, kvp.Value);
93+
}
94+
8995
// Perform the actual fetch
9096
repo.Network.Fetch(remote, new FetchOptions {
9197
TagFetchMode = TagFetchMode.All,
@@ -96,7 +102,7 @@ public void CanFetchAllTagsIntoAnEmptyRepository(string url)
96102
expectedFetchState.CheckUpdatedReferences(repo);
97103

98104
// Verify the reflog entries
99-
Assert.Equal(0, repo.Refs.Log(string.Format("refs/remotes/{0}/master", remoteName)).Count()); // Only tags are retrieved
105+
Assert.Equal(1, repo.Refs.Log(string.Format("refs/remotes/{0}/master", remoteName)).Count()); // Branches are also retrieved
100106
}
101107
}
102108

LibGit2Sharp.Tests/ResetHeadFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void ResettingWithBadParamsThrows()
7171
Assert.Throws<ArgumentNullException>(() => repo.Reset(ResetMode.Soft, (Commit)null));
7272
Assert.Throws<ArgumentException>(() => repo.Reset(ResetMode.Soft, ""));
7373
Assert.Throws<LibGit2SharpException>(() => repo.Reset(ResetMode.Soft, Constants.UnknownSha));
74-
Assert.Throws<LibGit2SharpException>(() => repo.Reset(ResetMode.Soft, repo.Head.Tip.Tree.Sha));
74+
Assert.Throws<InvalidSpecificationException>(() => repo.Reset(ResetMode.Soft, repo.Head.Tip.Tree.Sha));
7575
}
7676
}
7777

LibGit2Sharp.Tests/StatusFixture.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -401,21 +401,6 @@ public void RetrievingTheStatusOfTheRepositoryHonorsTheGitIgnoreDirectives()
401401
}
402402
}
403403

404-
[Fact]
405-
public void RetrievingTheStatusOfAnAmbiguousFileThrows()
406-
{
407-
string path = CloneStandardTestRepo();
408-
using (var repo = new Repository(path))
409-
{
410-
Touch(repo.Info.WorkingDirectory, "1/ambiguous1.txt", "I don't like brackets.");
411-
412-
string relativePath = Path.Combine("1", "ambiguous[1].txt");
413-
Touch(repo.Info.WorkingDirectory, relativePath, "Brackets all the way.");
414-
415-
Assert.Throws<AmbiguousSpecificationException>(() => repo.RetrieveStatus(relativePath));
416-
}
417-
}
418-
419404
[Theory]
420405
[InlineData(true, FileStatus.Unaltered, FileStatus.Unaltered)]
421406
[InlineData(false, FileStatus.Missing, FileStatus.Untracked)]

0 commit comments

Comments
 (0)