libgit2 / libgit2/libgit2sharp

Error when fetching from remote LibGit2Sharp.NotFoundException: 'object not found - no match for id

Open
#1,828 5 comments 6 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

We have been having a problem with libgit2sharp being unable to fetch from a remote after it gets to a certain size/certain number of branches. Researching this error seems to come back with results of problems with a sparse checkout which this isn't doing. I have attached a example program and repository that reproduces it. If you go to the generated repository user in the bin folder after running the program and run git pull from the command line it completes successfully.

Reproduction steps

Run the program downloadable here. I don't know exactly what it is about the repository that causes the problem.

Expected behavior

The fetch works as normal

Actual behavior

LibGit2Sharp.NotFoundException: 'object not found - no match for id (073a4772601e16614079cff44ca8d7d6275f6377)' is thrown

Version of LibGit2Sharp (release number or SHA1)

v0.26.2

Operating system(s) tested; .NET runtime tested

.NET Core SDK (reflecting any global.json):
Version: 3.1.401
Commit: 5b6f5e5005

Runtime Environment:
OS Name: Windows
OS Version: 10.0.18363
OS Platform: Windows
RID: win10-x64

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 by running the downloadable ConsoleApp1 reproduction and inspecting the generated repository in the bin folder. Compare the LibGit2Sharp fetch with the successful command-line git pull, then trace the failing fetch path for the reported object ID; done means the reproduction fetch completes without NotFoundException.

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.