René's URL Explorer Experiment


Title: Add mempack ODB backend, Index.create, and Odb.addMempackBackend by jkoppel · Pull Request #2040 · nodegit/nodegit · GitHub

Open Graph Title: Add mempack ODB backend, Index.create, and Odb.addMempackBackend by jkoppel · Pull Request #2040 · nodegit/nodegit

X Title: Add mempack ODB backend, Index.create, and Odb.addMempackBackend by jkoppel · Pull Request #2040 · nodegit/nodegit

Description: Exposes libgit2's mempack API so you can compute tree hashes in-memory without touching .git/objects/. Partially addresses #1296 (adds the built-in mempack backend, but not arbitrary custom backends). What's new Mempack.create() — wraps git_mempack_new Odb.prototype.addMempackBackend(backend, priority) — wraps git_odb_add_backend Index.create() — wraps git_index_new (free-standing in-memory index) Mempack.prototype.reset() — wraps git_mempack_reset Usage const repo = await NodeGit.Repository.open("/path/to/repo"); const odb = await repo.odb(); const mempack = await NodeGit.Mempack.create(); await odb.addMempackBackend(mempack, 999); const index = await NodeGit.Index.create(); // ... add entries, then: const treeOid = await index.writeTreeTo(repo); // writes to RAM, not disk await mempack.reset(); Implementation notes git_index_new was already known to the generator but ignored — just had to un-ignore it. The mempack/odb_backend stuff needed manual C++ bindings since git_odb_backend* isn't a type the generator handles. Added via cFile entries in libgit2-supplement.json, same pattern as the existing manual bindings for clone, revwalk, etc. The vendored libgit2 already compiles odb_mempack.c so no build changes were needed beyond what the generator produces.

Open Graph Description: Exposes libgit2's mempack API so you can compute tree hashes in-memory without touching .git/objects/. Partially addresses #1296 (adds the built-in mempack backend, but not arbitrary custom bac...

X Description: Exposes libgit2's mempack API so you can compute tree hashes in-memory without touching .git/objects/. Partially addresses #1296 (adds the built-in mempack backend, but not arbitrary custom...

Opengraph URL: https://github.com/nodegit/nodegit/pull/2040

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:b5853c75-44bd-a061-3a0e-b783f73b0ff9
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id97FA:AB3B5:A50B7:E6AFA:6AFD7B39
html-safe-nonceb1b1d5770a4a55ba4e651f8a4dc0c6a02934dcc55f24004b646584fae9b88393
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5N0ZBOkFCM0I1OkE1MEI3OkU2QUZBOjZBRkQ3QjM5IiwidmlzaXRvcl9pZCI6IjQ5MTE0NzI0ODY5MjAzMjE4NDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd3b865cd3d6363bb3d3d47d2ed81c3f276e4076260af714d3b1c1accd7005644
hovercard-subject-tagpull_request:3379267272
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/nodegit/nodegit/pull/2040/files
twitter:imagehttps://avatars.githubusercontent.com/u/1279592?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1279592?s=400&v=4
og:image:altExposes libgit2's mempack API so you can compute tree hashes in-memory without touching .git/objects/. Partially addresses #1296 (adds the built-in mempack backend, but not arbitrary custom bac...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None544ff6b59bd215c4609120f6e334dbd0b00d34fb6f8bc03a476f72256998887e
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/nodegit/nodegit git https://github.com/nodegit/nodegit.git
octolytics-dimension-user_id657068
octolytics-dimension-user_loginnodegit
octolytics-dimension-repository_id1383170
octolytics-dimension-repository_nwonodegit/nodegit
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1383170
octolytics-dimension-repository_network_root_nwonodegit/nodegit
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release71c92f8b27ec5e9aa6f6477b4e067a4727fc9edb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nodegit/nodegit/pull/2040/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodegit%2Fnodegit%2Fpull%2F2040%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodegit%2Fnodegit%2Fpull%2F2040%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=nodegit%2Fnodegit
Reloadhttps://github.com/nodegit/nodegit/pull/2040/files
Reloadhttps://github.com/nodegit/nodegit/pull/2040/files
Reloadhttps://github.com/nodegit/nodegit/pull/2040/files
nodegithttps://github.com/nodegit
nodegithttps://github.com/nodegit/nodegit
Codehttps://github.com/nodegit/nodegit
Issues344 (344)https://github.com/nodegit/nodegit/issues
Pull requests23 (23)https://github.com/nodegit/nodegit/pulls
Projectshttps://github.com/nodegit/nodegit/projects
Security and qualityhttps://github.com/nodegit/nodegit/security
Insightshttps://github.com/nodegit/nodegit/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fnodegit%2Fnodegit%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fnodegit%2Fnodegit%2Fissues%2Fnew%2Fchoose
jkoppelhttps://github.com/jkoppel
nodegit:masterhttps://github.com/nodegit/nodegit/tree/master
up-to-speed:mempack-backendhttps://github.com/up-to-speed/nodegit/tree/mempack-backend
Conversation 0 https://github.com/nodegit/nodegit/pull/2040
Commits 3 https://github.com/nodegit/nodegit/pull/2040/commits
Checks 0 https://github.com/nodegit/nodegit/pull/2040/checks
Files changed 12 https://github.com/nodegit/nodegit/pull/2040/files
Add mempack ODB backend, Index.create, and Odb.addMempackBackend https://github.com/nodegit/nodegit/pull/2040/files#top
Show all changes 3 commits https://github.com/nodegit/nodegit/pull/2040/files
612ee77 Adding support for mempack backend jkoppel Mar 10, 2026 https://github.com/nodegit/nodegit/pull/2040/commits/612ee77ae94958b7b2626079da3d6a7348fee035
85a55c1 Add Odb.hash and Repository.hashfile bindings for zero-ODB-write hashing jkoppel Mar 10, 2026 https://github.com/nodegit/nodegit/pull/2040/commits/85a55c1f06c157ea9bb9081942f35ef2cf78093a
2b0143f Add @types/nodegit dev dependency jkoppel Mar 10, 2026 https://github.com/nodegit/nodegit/pull/2040/commits/2b0143f7f11ca97401bbdd9241b1f849f29f2c6a
Clear filters https://github.com/nodegit/nodegit/pull/2040/files
Please reload this pagehttps://github.com/nodegit/nodegit/pull/2040/files
Please reload this pagehttps://github.com/nodegit/nodegit/pull/2040/files
descriptor.json https://github.com/nodegit/nodegit/pull/2040/files#diff-ff00cd010b7df4b1f1cd901205bce54d2c39c0752d2ab09b09bbe4a2ead48bf2
libgit2-supplement.json https://github.com/nodegit/nodegit/pull/2040/files#diff-0da734fe4be22b8604123d9d8791bc1b0a32d7dc724fcaab72aaae27c57853d2
odb_backend.h https://github.com/nodegit/nodegit/pull/2040/files#diff-95db2a7d79f2accefe3af1007982855bf2ebbaad175e8b05529a1c0eb9c05231
create.cc https://github.com/nodegit/nodegit/pull/2040/files#diff-9df6fe356b427f2b41e4bf88f1a676d581c07aa716090bc50bebd3ef34ff4027
reset.cc https://github.com/nodegit/nodegit/pull/2040/files#diff-e0a96c917e4eff0aea36c937a0eb25261557a4e16e96d2d677d8f8c00de480e3
add_backend.cc https://github.com/nodegit/nodegit/pull/2040/files#diff-b9fb4c2d5ebcc3cd85d6536be4842b0ba24585e6bed2ad19efb2ac8859004262
mempack.js https://github.com/nodegit/nodegit/pull/2040/files#diff-c3574bf9a8df6aea2d93f7b0c3041e7ab8da7fcbc2cbdc3a95e3adafabc8c7b4
odb.js https://github.com/nodegit/nodegit/pull/2040/files#diff-c52f0fa5572cf6c96d83943a717c077e3b83274c3b421ca079f704e4eaa15cc9
package-lock.json https://github.com/nodegit/nodegit/pull/2040/files#diff-053150b640a7ce75eff69d1a22cae7f0f94ad64ce9a855db544dda0929316519
package.json https://github.com/nodegit/nodegit/pull/2040/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519
hash.js https://github.com/nodegit/nodegit/pull/2040/files#diff-78bc58d71e452a857f83945d4d04cd2bacec802f669899835a6af55901b905ba
mempack.js https://github.com/nodegit/nodegit/pull/2040/files#diff-10efbd7765a6888ba9f2769ee88dbb08f645ab26ef3428eada2ccc82cd21b7e4
generate/input/descriptor.jsonhttps://github.com/nodegit/nodegit/pull/2040/files#diff-ff00cd010b7df4b1f1cd901205bce54d2c39c0752d2ab09b09bbe4a2ead48bf2
View file https://github.com/nodegit/nodegit/blob/2b0143f7f11ca97401bbdd9241b1f849f29f2c6a/generate/input/descriptor.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodegit/nodegit/pull/2040/{{ revealButtonHref }}
https://github.com/nodegit/nodegit/pull/2040/files#diff-ff00cd010b7df4b1f1cd901205bce54d2c39c0752d2ab09b09bbe4a2ead48bf2
https://github.com/nodegit/nodegit/pull/2040/files#diff-ff00cd010b7df4b1f1cd901205bce54d2c39c0752d2ab09b09bbe4a2ead48bf2
https://github.com/nodegit/nodegit/pull/2040/files#diff-ff00cd010b7df4b1f1cd901205bce54d2c39c0752d2ab09b09bbe4a2ead48bf2
https://github.com/nodegit/nodegit/pull/2040/files#diff-ff00cd010b7df4b1f1cd901205bce54d2c39c0752d2ab09b09bbe4a2ead48bf2
https://github.com/nodegit/nodegit/pull/2040/files#diff-ff00cd010b7df4b1f1cd901205bce54d2c39c0752d2ab09b09bbe4a2ead48bf2
https://github.com/nodegit/nodegit/pull/2040/files#diff-ff00cd010b7df4b1f1cd901205bce54d2c39c0752d2ab09b09bbe4a2ead48bf2
https://github.com/nodegit/nodegit/pull/2040/files#diff-ff00cd010b7df4b1f1cd901205bce54d2c39c0752d2ab09b09bbe4a2ead48bf2
https://github.com/nodegit/nodegit/pull/2040/files#diff-ff00cd010b7df4b1f1cd901205bce54d2c39c0752d2ab09b09bbe4a2ead48bf2
https://github.com/nodegit/nodegit/pull/2040/files#diff-ff00cd010b7df4b1f1cd901205bce54d2c39c0752d2ab09b09bbe4a2ead48bf2
https://github.com/nodegit/nodegit/pull/2040/files#diff-ff00cd010b7df4b1f1cd901205bce54d2c39c0752d2ab09b09bbe4a2ead48bf2
generate/input/libgit2-supplement.jsonhttps://github.com/nodegit/nodegit/pull/2040/files#diff-0da734fe4be22b8604123d9d8791bc1b0a32d7dc724fcaab72aaae27c57853d2
View file https://github.com/nodegit/nodegit/blob/2b0143f7f11ca97401bbdd9241b1f849f29f2c6a/generate/input/libgit2-supplement.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodegit/nodegit/pull/2040/{{ revealButtonHref }}
https://github.com/nodegit/nodegit/pull/2040/files#diff-0da734fe4be22b8604123d9d8791bc1b0a32d7dc724fcaab72aaae27c57853d2
https://github.com/nodegit/nodegit/pull/2040/files#diff-0da734fe4be22b8604123d9d8791bc1b0a32d7dc724fcaab72aaae27c57853d2
https://github.com/nodegit/nodegit/pull/2040/files#diff-0da734fe4be22b8604123d9d8791bc1b0a32d7dc724fcaab72aaae27c57853d2
https://github.com/nodegit/nodegit/pull/2040/files#diff-0da734fe4be22b8604123d9d8791bc1b0a32d7dc724fcaab72aaae27c57853d2
https://github.com/nodegit/nodegit/pull/2040/files#diff-0da734fe4be22b8604123d9d8791bc1b0a32d7dc724fcaab72aaae27c57853d2
generate/templates/manual/include/odb_backend.hhttps://github.com/nodegit/nodegit/pull/2040/files#diff-95db2a7d79f2accefe3af1007982855bf2ebbaad175e8b05529a1c0eb9c05231
View file https://github.com/nodegit/nodegit/blob/2b0143f7f11ca97401bbdd9241b1f849f29f2c6a/generate/templates/manual/include/odb_backend.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodegit/nodegit/pull/2040/{{ revealButtonHref }}
generate/templates/manual/mempack/create.cchttps://github.com/nodegit/nodegit/pull/2040/files#diff-9df6fe356b427f2b41e4bf88f1a676d581c07aa716090bc50bebd3ef34ff4027
View file https://github.com/nodegit/nodegit/blob/2b0143f7f11ca97401bbdd9241b1f849f29f2c6a/generate/templates/manual/mempack/create.cc
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodegit/nodegit/pull/2040/{{ revealButtonHref }}
generate/templates/manual/mempack/reset.cchttps://github.com/nodegit/nodegit/pull/2040/files#diff-e0a96c917e4eff0aea36c937a0eb25261557a4e16e96d2d677d8f8c00de480e3
View file https://github.com/nodegit/nodegit/blob/2b0143f7f11ca97401bbdd9241b1f849f29f2c6a/generate/templates/manual/mempack/reset.cc
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodegit/nodegit/pull/2040/{{ revealButtonHref }}
Please reload this pagehttps://github.com/nodegit/nodegit/pull/2040/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.