Fix bug in isValidRemoteName by alehed · Pull Request #666 · libgit2/objective-git
Navigation Menu
{{ message }}
libgit2 / objective-git Public
- Notifications You must be signed in to change notification settings
- Fork 285
Merged
Fix bug in isValidRemoteName#666
tiennou merged 1 commit intolibgit2:masterfrom
Fix bug in isValidRemoteName#666
tiennou merged 1 commit intolibgit2:masterfrom
Conversation
Copy link
Contributor
alehed
commented
Sep 8, 2018
alehed
commented
According to the docs git_remote_is_valid_name returns either 1 (success) or 0.
tiennou requested changes Sep 10, 2018
ObjectiveGit/GTRemote.m
Outdated
ObjectiveGit/GTRemote.m Outdated
| 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
force-pushed
the
valid_remote_name
branch
from
17acb08 to
6374f3b
Compare
Copy link
Contributor Author
alehed
commented
Sep 10, 2018
alehed commented
Sep 10, 2018Rebased and pushed
Copy link
Contributor
tiennou
commented
Sep 10, 2018
tiennou commented
Sep 10, 2018Perfect, thanks !
tiennou
merged commit
6fe2c65
into
libgit2:master
tiennou
mentioned this pull request
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment