return pathspec;
}
+char *pathspec_prefix(const char **pathspec)
+{
+ size_t len = common_prefix_len(pathspec);
+
+ return len ? xmemdupz(*pathspec, len) : NULL;
+}
+
/*
* Test if it looks like we're at a git directory.
* We want to see:
const char *slash;
struct stat st;
int fd;
- size_t len;
+ ssize_t len;
if (stat(path, &st))
return NULL;