8000 git_refdb_backend_fs does not set refdb backend version · Issue #5449 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

git_refdb_backend_fs does not set refdb backend version #5449

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ddevault opened this issue Mar 9, 2020 · 4 comments
Closed

git_refdb_backend_fs does not set refdb backend version #5449

ddevault opened this issue Mar 9, 2020 · 4 comments

Comments

@ddevault
Copy link
Contributor
ddevault commented Mar 9, 2020

Reproduction steps

git_refdb_backend backend = {0};
git_repository *repo = /* ... */;

git_refdb_backend_fs(&backend, repo);
assert(backend.version != 0); // FAIL

Expected behavior

Should populate the version field.

Aside: it would be nice if it took a path instead of fetching it out of a git_repository, which might not have a path. This forces us to create a git_repository with the default backends, then throw them out later, if we want to manually create a refdb_backend_fs.

Actual behavior

Version number is left unpopulated.

Version of libgit2 (release number or SHA1)

e23b8b4

Operating system(s) tested

Linux

@pks-t
Copy link
Member
pks-t commented Mar 13, 2020

Indeed, thanks for your report! I've fixed that in #5456, could you please verify it fixes your issue?

Aside: it would be nice if it took a path instead of fetching it out of a git_repository, which might not have a path. This forces us to create a git_repository with the default backends, then throw them out later, if we want to manually create a refdb_backend_fs.

That'd make a lot of sense to me, yeah. I already got quite a lot on my backlog for post v1.0, but this should probably be quite easy to implement. So I'd be happy if somebody picked it up, but feel free to give me a ping after v1.0 is out.

@ddevault
Copy link
Contributor Author

I can confirm that #5456 fixes the immediate problem, but I ran into some more. I'll investigate next week and open additional tickets as necessary, but this particular issue is resolved when #5456 is merged. Thanks!

@ddevault
Copy link
Contributor Author

I'll investigate next week and open additional tickets as necessary

Investigation concluded, it was my fault - not libgit2.

@pks-t
Copy link
Member
pks-t commented Mar 23, 2020

Fixed via #5456. Thanks again for your report!

@pks-t pks-t closed this as completed Mar 23, 2020
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

No branches or pull requests

2 participants
0