Not all programs necessarily have a pathspec array of pathnames, some of
them (like git-update-cache) want to do things one file at a time. So
export the single-path interface too.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
extern const char **get_pathspec(const char *prefix, char **pathspec);
extern const char *setup_git_directory(void);
+extern char *prefix_path(const char *prefix, int len, char *path);
#define alloc_nr(x) (((x)+16)*3/2)
#include "cache.h"
-static char *prefix_path(const char *prefix, int len, char *path)
+char *prefix_path(const char *prefix, int len, char *path)
{
char *orig = path;
for (;;) {