Skip to content

Preserve LibGit2 lifetimes and serialize tests - #1497

Merged
AArnott merged 2 commits into
mainfrom
copilot/fix-libgit2-deferred-lifetimes
Sep 1, 2026
Merged

Preserve LibGit2 lifetimes and serialize tests#1497
AArnott merged 2 commits into
mainfrom
copilot/fix-libgit2-deferred-lifetimes

Conversation

@AArnott

@AArnott AArnott commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Preserve LibGit2Sharp object lifetimes by materializing commit queries before returning them and snapshotting VersionOracle context data at construction.

This eliminates deferred native access after a GitContext has been disposed, a repository-local source of Linux/net10 access violations.

Serializes this test assembly's collections as temporary containment for a remaining access violation in LibGit2Sharp's live Commit.Parents path. The upstream failure is tracked in libgit2/libgit2sharp#2192.

Testing

  • dotnet test --project test\Nerdbank.GitVersioning.Tests\Nerdbank.GitVersioning.Tests.csproj -c Release --framework net10.0 -- --filter-not-trait "TestCategory=FailsInCloudTest"

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@AArnott
AArnott enabled auto-merge September 1, 2026 02:53
@AArnott
AArnott added this pull request to the merge queue Sep 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 1, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@AArnott AArnott changed the title Preserve LibGit2 object lifetimes Preserve LibGit2 lifetimes and serialize tests Sep 1, 2026
@AArnott
AArnott enabled auto-merge September 1, 2026 03:29
@AArnott
AArnott added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit 689ee4d Sep 1, 2026
16 checks passed
@AArnott
AArnott deleted the copilot/fix-libgit2-deferred-lifetimes branch September 1, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant