Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
use isxdigit() for checking if a character is a hexadecimal digit
[gitweb.git]
/
sha1_name.c
diff --git
a/sha1_name.c
b/sha1_name.c
index c2c938c4e161fc6849a87a7a19336712f36f74ff..dc85aafeca28ad7c1948d2017e06f69a4105065e 100644
(file)
--- a/
sha1_name.c
+++ b/
sha1_name.c
@@
-749,7
+749,7
@@
static int get_describe_name(const char *name, int len, unsigned char *sha1)
for (cp = name + len - 1; name + 2 <= cp; cp--) {
char ch = *cp;
- if (
hexval(ch) & ~0377
) {
+ if (
!isxdigit(ch)
) {
/* We must be looking at g in "SOMETHING-g"
* for it to be describe output.
*/