aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-11-11 21:08:03 +0700
committerJunio C Hamano <gitster@pobox.com>2010-12-07 14:25:46 -0800
commitedc54fb5d4ce6774fc2ac76779bd57dc2d6ab189 (patch)
tree5d95bd32dc8e15db507f9c268c4a4c8a0ed346c3 /cache.h
parent309be813c9b75fed70f3a03bf803bf47c6670cfc (diff)
downloadgit-edc54fb5d4ce6774fc2ac76779bd57dc2d6ab189.tar.gz
git-edc54fb5d4ce6774fc2ac76779bd57dc2d6ab189.tar.xz
Make prefix_path() return char* without const
prefix_path() allocates new buffer. There's no reason for it to keep the buffer for itself and waste memory. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 222d9cf3a..bd181c6e7 100644
--- a/cache.h
+++ b/cache.h
@@ -428,7 +428,7 @@ extern const char **get_pathspec(const char *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);
-extern const char *prefix_path(const char *prefix, int len, const char *path);
+extern char *prefix_path(const char *prefix, int len, const char *path);
extern const char *prefix_filename(const char *prefix, int len, const char *path);
extern int check_filename(const char *prefix, const char *name);
extern void verify_filename(const char *prefix, const char *name);