]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-compat-util.h
Bust the ghost of long-defunct diffcore-pathspec.
[thirdparty/git.git] / git-compat-util.h
index 8c7e11473390c14956e43843c17a2d85a336a087..cf89cdf4598b3796724a85aa707f740245155cdc 100644 (file)
@@ -157,6 +157,12 @@ extern void set_warn_routine(void (*routine)(const char *warn, va_list params));
 extern int prefixcmp(const char *str, const char *prefix);
 extern time_t tm_to_time_t(const struct tm *tm);
 
+static inline const char *skip_prefix(const char *str, const char *prefix)
+{
+       size_t len = strlen(prefix);
+       return strncmp(str, prefix, len) ? NULL : str + len;
+}
+
 #ifdef NO_MMAP
 
 #ifndef PROT_READ