]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sha1_name.c
use isxdigit() for checking if a character is a hexadecimal digit
[thirdparty/git.git] / sha1_name.c
index c2c938c4e161fc6849a87a7a19336712f36f74ff..dc85aafeca28ad7c1948d2017e06f69a4105065e 100644 (file)
@@ -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.
                         */