Question

I'm having difficulties making libgit2sharp / libgit2 work with git submodules.

I have git repository with several items linked as submodules to folder within repository. Git and GitHub recognizes them fine, however when I'm trying to retrieve these folders status via libgit2sharp / libgit2 an exception raises. It says that "Failed to determine status of file '[filename]'. Provided path leads to a folder, not a file"

Should libgit2 provide status for submodule folders? Do they have status at all? At the moment I'm just skipping querying of these items state, but feel it isn't right.

Many thanks in advance for your help!

Was it helpful?

Solution

I found the offending piece of code :)

Beware both libgit2 and libgit2sharp are works in progress. They're not git feature complete. And, as far as I know, submodules are not implemented yet.

Should libgit2 provide status for submodule folders? Do they have status at all? At the moment I'm just skipping querying of these items state, but feel it isn't right.

I can think of two places where those questions would be answered:

OTHER TIPS

If you want to get the update information of submodules, you need to enter the submodule folder and treat it as a total repo. The root repo only track the commit id of submodules.
Maybe you'll be interested in this Question.
Wish it is what you want. :)
And here is a doc on submodule.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top