Commit 29f72aa6 by nulltoken

revparse: leverage git__isdigit()

parent 98d6a1fd
...@@ -115,10 +115,11 @@ static int revparse_lookup_object(git_object **out, git_repository *repo, const ...@@ -115,10 +115,11 @@ static int revparse_lookup_object(git_object **out, git_repository *repo, const
static int all_chars_are_digits(const char *str, size_t len) static int all_chars_are_digits(const char *str, size_t len)
{ {
size_t i=0; size_t i = 0;
for (i=0; i<len; i++) {
if (str[i] < '0' || str[i] > '9') return 0; for (i = 0; i < len; i++)
} if (!git__isdigit(str[i])) return 0;
return 1; return 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment