From 5879f5684cfe8a38326b4ffd078f96e35c68e640 Mon Sep 17 00:00:00 2001 From: Clemens Buchacher Date: Sun, 4 Sep 2011 12:41:59 +0200 Subject: remove prefix argument from pathspec_prefix Passing a prefix to a function that is supposed to find the prefix is strange. And it's really only used if the pathspec is NULL. Make the callers handle this case instead. As we are always returning a fresh copy of a string (or NULL), change the type of the returned value to non-const "char *". Signed-off-by: Clemens Buchacher Signed-off-by: Junio C Hamano --- cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 553a6ebd4b..a3462bafce 100644 --- a/cache.h +++ b/cache.h @@ -426,7 +426,7 @@ extern void set_git_work_tree(const char *tree); #define ALTERNATE_DB_ENVIRONMENT "GIT_ALTERNATE_OBJECT_DIRECTORIES" extern const char **get_pathspec(const char *prefix, const char **pathspec); -extern const char *pathspec_prefix(const char *prefix, const char **pathspec); +extern char *pathspec_prefix(const char **pathspec); extern void setup_work_tree(void); extern const char *setup_git_directory_gently(int *); extern const char *setup_git_directory(void); -- cgit v1.2.3