Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support setting oid type for in-memory repositories#6671

New issue

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

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethomson merged 1 commit intolibgit2:mainfromkcsaul:repo_new_oid_type
Dec 14, 2023

Conversation

kcsaul
Copy link
Contributor

This change adds support for setting oid type when creating an in-memory repository using git_repository_new (in conjunction with using custom backends).

Needed to prevent "ambiguous lookup - OID prefix is too short" error during git_object_lookup_prefix.

@ethomson
Copy link
Member

Great catch. Thanks for the fix.

I wonder if we should take agit_repository_new_options here? The name is a bit regrettable, but matches our style. This could help future-proof that API in case we want to add more things later.

@kcsaul
Copy link
ContributorAuthor

@ethomson - I'd wondered the same thing, but as it appears the basic purpose of git_repository_new is similar to git_index_new for the creation of blank/in-memory structure, it seemed sufficient to take the same approach as git_index_new for the time being at least.

Could be revised if needed later with minimal disruption while it's still behind the experimental feature toggle. My immediate goal was getting things working for my existing use case without the experimental flag enabled as part of upgrading to latest version.

@ethomsonethomson merged commite020c85 intolibgit2:mainDec 14, 2023
@ethomson
Copy link
Member

Makes sense. Thanks again@kcsaul

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@kcsaul@ethomson

[8]ページ先頭

©2009-2025 Movatter.jp