ls-tree: disable negative pathspec because it's not supported
[gitweb.git] / builtin / apply.c
index 69efb0e4df1514cf20830d180165fd58dc633fd7..6696ea4c3ffd4f7af04f3f56609a78a74a0a0b55 100644 (file)
@@ -436,7 +436,7 @@ static unsigned long linelen(const char *buffer, unsigned long size)
 
 static int is_dev_null(const char *str)
 {
-       return !memcmp("/dev/null", str, 9) && isspace(str[9]);
+       return skip_prefix(str, "/dev/null", &str) && isspace(*str);
 }
 
 #define TERM_SPACE     1