Commit 9cd25d0003ed483f40ade3542368a962437f10d2

nulltoken 2012-05-09T13:21:21

util: Fix git__isspace() implementation The characters <space>, <form-feed>, <newline>, <carriage-return>, <tab>, and <vertical-tab> are part of the "space" definition. cf. http://www.kernel.org/doc/man-pages/online/pages/man5/locale.5.html

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/util.h b/src/util.h
index 6321e21..2081f29 100644
--- a/src/util.h
+++ b/src/util.h
@@ -206,7 +206,7 @@ GIT_INLINE(bool) git__isalpha(int c)
 
 GIT_INLINE(bool) git__isspace(int c)
 {
-    return (c == ' ' || c == '\t' || c == '\n' || c == '\12');
+    return (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\r' || c == '\v');
 }
 
 #endif /* INCLUDE_util_h__ */