Skip to content

Conversation

@alehed
Copy link
Contributor

@alehed alehed commented Sep 8, 2018

According to the docs git_remote_is_valid_name returns either 1 (success) or 0.

NSParameterAssert(name != nil);

return git_remote_is_valid_name(name.UTF8String) == GIT_OK;
return git_remote_is_valid_name(name.UTF8String);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer return (git_remote_is_valid_name(name.UTF8String) == 1 ? YES : NO); so there's no chance of a -1 error being reported as "true", and we force-map to "BOOL"-compatible values.

According to the docs git_remote_is_valid_name returns either 1 (success) or 0.
@alehed
Copy link
Contributor Author

alehed commented Sep 10, 2018

Rebased and pushed

@tiennou
Copy link
Contributor

tiennou commented Sep 10, 2018

Perfect, thanks !

@tiennou tiennou merged commit 6fe2c65 into libgit2:master Sep 10, 2018
@tiennou tiennou mentioned this pull request Oct 27, 2018
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