libgit2 / libgit2/libgit2sharp

Exception During Rebase: No error message has been provided by the native library

Open
#1,698 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
3.5k
Forks
925
PR merge metrics
No merged PRs in 30d

Description

I've seen this happen a couple times out of a hundred, so it is difficult to reproduce. When it has happened, I've rebased successfully from the command-line without any conflicts; then when I re-run this it still fails.

Stack Trace

LibGit2Sharp.LibGit2SharpException: No error message has been provided by the native library
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
at LibGit2Sharp.Core.Proxy.git_rebase_init(RepositoryHandle repo, AnnotatedCommitHandle branch, AnnotatedCommitHandle upstream, AnnotatedCommitHandle onto, GitRebaseOptions options)
at LibGit2Sharp.Rebase.Start(Branch branch, Branch upstream, Branch onto, Identity committer, RebaseOptions options)

Reproduction steps
var rebaseResult = repository.Rebase.Start(featureBranch, masterBranch, null, _getIdentity(repository), new RebaseOptions());
Expected behavior

A rebaseResult.Status

Actual behavior

An exception

Version of LibGit2Sharp (release number or SHA1)

0.26.0

Operating system(s) tested; .NET runtime tested

Windows 10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Rebase.Start call in the reproduction and trace it through LibGit2Sharp.Rebase.Start, Core.Proxy.git_rebase_init, and Core.Ensure.HandleError. Reproduce on Windows 10 with LibGit2Sharp 0.26.0 and the supplied branch arguments, then compare the native failure with the expected rebaseResult.Status. Done means the intermittent case is explained and handled without the empty-error exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, git
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.