>Please have a look for yourself, but at a glance I didn't see anywhere that we publicly accept GitObject where we have special cases that depend on the type provided, presumably allowing libgit2 to determine which object types are acceptable.

You're right. Thanks!

>It would be good to support TreeDefinition.Add(string targetTreeEntryPath, GitLink link) eventually.

I strongly agree with you. However; I'm not sure about the API. How would the user create the `GitLink` in the first place? Beside this, I'm not sure it would be safe to let pick the path by himself.

I wonder if `TreeDefinition.Add(Submodule module)` would work? Though, I can still think of a corner case where the `TreeDefinition` would be used to not build a root `Tree`, but a sub`Tree` (which would result in having the path in the `.gitmodules` file and the path from the root `Tree` being different)