-
Notifications
You must be signed in to change notification settings - Fork 899
Repository.Clone with RecurseSubmodules crashes for nested submodule #1115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
🆒 report ! Thanks for this. Some questions below:
/cc @jamill |
Hi - thanks for the speedy response. 😄 The snippet of libgit2sharp code I'm using to do the cloning is: Repository.Clone(GitRepository, WorkingDirectory,
new CloneOptions()
{
RecurseSubmodules = true,
BranchName = this.CheckoutBranch,
CredentialsProvider = (_url, _user, _cred) => new UsernamePasswordCredentials
{
Username = GitUsername,
Password = GitPassword
},
OnCheckoutProgress = checkoutProgress,
OnProgress = progressHandler,
}); Hope that helps! |
@philmccarthy24 Thanks for the prompt feedback as well 😉
I imagine that the plain As far I can tell, @jamill made some extensive tests while teaching clone to honor
Any chance, you could publish a very simple public repository with such a configuration so that we could start working on this? Without it, I'm afraid it may take some time before we're able to find by chance a potential matching setup. |
Bah! I've tried to replicate the issue using a simple public repo on github with nested submodules: |
@philmccarthy24 Thanks for having given a try. One thing though, could it be related to Just reopened the issue in order to keep track of this. |
This indicates a problem with the path verification logic (that verifies that no one is trying to write into the .git directory). Maybe @ethomson would have some thoughts on what might be going on here. If we cannot figure out what is going on from the current information, we could always build an instrumented libgit2to log what is failing validation here. |
I would first check the length of the path that file would have when On Wed, Jun 24, 2015 at 9:01 AM, Jameson Miller [email protected]
|
Hi all |
86 < 259 so Wondering if there are junctions or hard-links in there anywhere.
Guess we'll never know 😞 |
@philmccarthy24 Would the |
to reproduce the bug try cloning this repo recursivly: https://github.com/embix/bug_libgit2sharpssubmodules/ |
@embix - This sounds like libgit2/libgit2#3500 What version of LibGit2Sharp are you using? Can you try with a nightly? |
LibGit2Sharp 14.0.23011.0 as provided with TFS 2015 RTM vNext Build Agent for Windows LibGit2Sharp_hash.txt says dcc2ef27218939d4f13652dd12d1716bac871eea. I guess the version does not help, as it is they use the VS version instead of the real libgit2sharp version. |
I see. The versions included in Visual Studio and TFS are quite different than released versions. Although Microsoft works closely with the LibGit2Sharp and libgit2 projects, these are different branches. And you couldn't drop a nightly into the build agent for a number of reasons. This should be fixed in TFS 2015 Update 1. I think that this fix made it into the RC build if you want to try a beta of the next build agent: https://www.visualstudio.com/en-us/news/tfs2015-update1-vs.aspx -ed
|
sounds promising, thx |
Confirmed. Update 1 fixed that bug. |
Fixed via libgit2/libgit2#3500 |
Using LibGit2Sharp 0.22.0-pre20150606092322, I cloned a repository containing a submodule, which in turn also has a submodule. I'm using CloneOptions with RecurseSubmodules=true.
The Repository.Clone call crashes with the following exception:
The text was updated successfully, but these errors were encountered: