Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Failed to write subtree #309

Closed
Haacked opened this Issue Feb 1, 2013 · 7 comments

Comments

Projects
None yet
3 participants
Contributor

Haacked commented Feb 1, 2013

I've been seeing this exception a lot while testing the latest lg2s.

LibGit2Sharp.LibGit2SharpException: An error was raised by libgit2. Category = Tree (Error).
Failed to write subtree
   at LibGit2Sharp.Core.Ensure.Success(Int32 result, Boolean allowPositiveResult)
   at LibGit2Sharp.Core.Proxy.git_tree_create_fromindex(Index index)
   at LibGit2Sharp.Repository.Commit(String message, Signature author, Signature committer, Boolean amendPreviousCommit)
   at LibGit2Sharp.RepositoryExtensions.Commit(IRepository repository, String message, Boolean amendPreviousCommit)

Problem is I don't know why. I can commit find with git.exe. It'd be nice to add more information on why it failed.

Owner

carlosmn commented Feb 1, 2013

That function was never well-designed. Turns out we always overwrite the specific error code. I think I'm the last one to rewrite it, so I'll try to figure out how to make it behave better when I can find time.

Member

nulltoken commented Feb 1, 2013

I've been seeing this exception a lot while testing the latest lg2s.

@Haacked Would you have some kind of repro case?

You know me. I always feel safer with a failing test 😉

Owner

carlosmn commented Feb 3, 2013

@Haacked could you try using the tip of https://github.com/carlosmn/libgit2/tree/tree-writer-error ? It should show what the actual problem is.

Contributor

Haacked commented Feb 3, 2013

I'm having trouble reproducing the issue in the first place. If I run into it, I'll let you know.

Member

nulltoken commented Apr 18, 2013

I'm having trouble reproducing the issue in the first place. If I run into it, I'll let you know.

Closing this now. Please feel free to reopen it when you're able to reproduce it.

@carlosmn What should we do with carlosmn/libgit2@20d40af ? Merge it? Or are there any side effect that would require a deeper rewrite?

@nulltoken nulltoken closed this Apr 18, 2013

Owner

carlosmn commented Apr 18, 2013

If I forgot to push that upstream, then it should go there.

Member

nulltoken commented Apr 18, 2013

@carlosmn ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment