summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 6fb2dc0f4..8d300987f 100644
--- a/src/util.h
+++ b/src/util.h
@@ -322,6 +322,12 @@ GIT_INLINE(bool) git__iswildcard(int c)
return (c == '*' || c == '?' || c == '[');
}
+GIT_INLINE(bool) git__iseol(const char *ptr, size_t len)
+{
+ char c = *ptr;
+ return (c == '\n' || (c == '\r' && len > 1 && *(ptr + 1) == '\n'));
+}
+
/*
* Parse a string value as a boolean, just like Core Git does.
*