Skip to content

Commit 4f72ab8

Browse files
TherzokEdward Thomson
authored andcommitted
Update libgit2 to 4eb97ef
libgit2/libgit2@3f8d005...4eb97ef
1 parent 55b3c42 commit 4f72ab8

24 files changed

+81
-67
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.
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/LibGit2Sharp.Tests.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@
123123
<Name>LibGit2Sharp</Name>
124124
</ProjectReference>
125125
</ItemGroup>
126+
<ItemGroup>
127+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
128+
</ItemGroup>
126129
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
127130
<PropertyGroup>
128131
<NativeBinariesDirectory>$(MSBuildProjectDirectory)\..\Lib\NativeBinaries</NativeBinariesDirectory>
@@ -140,4 +143,4 @@
140143
<Target Name="AfterBuild">
141144
</Target>
142145
-->
143-
</Project>
146+
</Project>

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

0 commit comments

Comments
 (0)