We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af11289 commit c7c12e7Copy full SHA for c7c12e7
LibGit2Sharp.Tests/TreeFixture.cs
@@ -200,5 +200,28 @@ public void CanRetrieveTreeEntryPath()
200
Assert.NotSame(anotherInstance, anInstance);
201
}
202
203
+
204
+ [Fact]
205
+ public void CanParseSymlinkTreeEntries()
206
+ {
207
+ var path = CloneBareTestRepo();
208
209
+ using (var repo = new Repository(path))
210
211
+ Blob linkContent = OdbHelper.CreateBlob(repo, "1/branch_file.txt");
212
213
+ var td = TreeDefinition.From(repo.Head.Tip)
214
+ .Add("A symlink", linkContent, Mode.SymbolicLink);
215
216
+ Tree t = repo.ObjectDatabase.CreateTree(td);
217
218
+ var te = t["A symlink"];
219
220
+ Assert.NotNull(te);
221
222
+ Assert.Equal(Mode.SymbolicLink, te.Mode);
223
+ Assert.Equal(linkContent, te.Target);
224
+ }
225
226
227
0 commit comments