Skip to content

object: rename git_object__size to git_object_size#5118

Merged
pks-t merged 1 commit into
masterfrom
ethomson/object_size
Jun 16, 2019
Merged

object: rename git_object__size to git_object_size#5118
pks-t merged 1 commit into
masterfrom
ethomson/object_size

Conversation

@ethomson

Copy link
Copy Markdown
Member

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

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

@pks-t pks-t left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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