Skip to content

Fix a few recent warnings#4087

Merged
ethomson merged 2 commits into
libgit2:masterfrom
tiennou:warnings
Jan 23, 2017
Merged

Fix a few recent warnings#4087
ethomson merged 2 commits into
libgit2:masterfrom
tiennou:warnings

Conversation

@tiennou
Copy link
Copy Markdown
Contributor

@tiennou tiennou commented Jan 23, 2017

No description provided.

Comment thread include/git2/tree.h
* @see git_treebuilder_write
*
* @param id Pointer to store the OID of the newly written tree
* @param oid Pointer to store the OID of the newly written tree
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.

This change conflicts with the one from @ethomson regarding the same issue. Only that he changed the argument's name in the function prototype instead of the docs. Hopefully we will not end up with both patches applied, resulting in the same but reversed issue :P

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.

Generally, we prefer id in things like commit_id or tree_id. We're sort of mixed about it when we're just talking about an id. There are a significant number of oids when we're not explicit about what kind of id.

Anyway, we might want to clarify that, but this needn't be the place. I'll drop my patches for these two changes.

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.

Yes, we decided a while back that the style is to use id as the name for object names, and "oid" is just a type. We did go through the API at one point to fix it all up, but it's quite probably they've snuck back in.

@ethomson
Copy link
Copy Markdown
Member

Thanks, @tiennou !

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.

4 participants