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

Skip to content

Conversation

ethomson
Copy link
Member

We don't use double-underscores in the public API.

We don't use double-underscores in the public API.
Copy link
Member

@pks-t pks-t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks @ethomson!

@pks-t pks-t merged commit 2bdb617 into master Jun 16, 2019
@carlosmn
Copy link
Member

I guess I'm a bit late to this, but should this even be public API? Could we rename it to make it clearer that it's not the size of the object itself but of our structure to hold the data?

I went in today expecting git_object_size to return the size of the cached object i.e. the uncompressed size of the underlying object.

@ethomson
Copy link
Member Author

I guess I'm a bit late to this, but should this even be public API?

🤷‍♂

Yeah, looking at it, I don't know why it's public.

@ethomson
Copy link
Member Author

Now would be a good time to fix this since we haven't had a release that does anything here. If you wanted to roll the rename back and just deprecate git_object__size entirely, then that would be fine with me.

@carlosmn
Copy link
Member

I can be useful if you're really trying to account for memory usage from objects accurately (since this is on top of the actual inflated object). But even then, you don't necessarily know how many objects are cached anyway.

So yeah, I think removing it is probably the best option at this point.

carlosmn added a commit that referenced this pull request Jul 29, 2019
In #5118 we remove the double-underscore to make it a normally-named public
function. However, this is not an interesting function outside of the library
and it takes up a name for something that could be more useful.

Remove the single-underscore version as we have not done any releases with it.
carlosmn added a commit that referenced this pull request Jul 29, 2019
In #5118 we remove the double-underscore to make it a normally-named public
function. However, this is not an interesting function outside of the library
and it takes up a name for something that could be more useful.

Remove the single-underscore version as we have not done any releases with it.
@ethomson ethomson deleted the ethomson/object_size branch February 2, 2020 13:07
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.

3 participants