Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixes #3251

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

Merged
merged 2 commits into from
Jun 24, 2015
Merged

Fixes #3251

merged 2 commits into from
Jun 24, 2015

Conversation

swisspol
Copy link
Contributor

No description provided.

@ethomson
Copy link
Member

Good catch, but why change the usage of a weakptr to a refcounted one?

@swisspol
Copy link
Contributor Author

Because git_repository_config__weakptr() is not available within test files AFAIK and Clang complains about the missing prototype.

@ethomson
Copy link
Member

Got it. For what it's worth, we don't link clar with a build of libgit2, we recompile clar with all the libgit2 sources, so that library-internal bits are available to the tests. So in this case we could just include repository.h for visibility.

Anyway, that's just an aside. This is a nice fix. Thanks.

@swisspol
Copy link
Contributor Author

I should have said "declared", not "available" :)

Yes, the build does complete successfully and obviously the symbol is found when running the tests since it's all in a single binary. I was however under the (incorrect?) impression that tests should mostly rely on APIs not SPIs.

@ethomson
Copy link
Member

Sure - we definitely want to test the public API, but for things like just getting the configuration (and not testing the configuration) then just using the internal bits seems reasonable.

ethomson added a commit that referenced this pull request Jun 24, 2015
@ethomson ethomson merged commit aacfd03 into libgit2:master Jun 24, 2015
@swisspol swisspol deleted the fixes branch June 24, 2015 04:40
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.

2 participants