Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Add prefixcmp()
[gitweb.git]
/
git-compat-util.h
diff --git
a/git-compat-util.h
b/git-compat-util.h
index 9863cf671f7522f73ea5a88af0d1234488c73396..d027c36b97510eec59be9299bb306e87469ae6ab 100644
(file)
--- a/
git-compat-util.h
+++ b/
git-compat-util.h
@@
-279,4
+279,9
@@
static inline int sane_case(int x, int high)
return x;
}
+static inline int prefixcmp(const char *str, const char *prefix)
+{
+ return strncmp(str, prefix, strlen(prefix));
+}
+
#endif