summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-07-14 08:36:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-15 17:56:09 (GMT)
commit645a29c40a12a4ade1b041dce246ae241c502a64 (patch)
tree9e24d8d5df40ea892967df3bbfa22e5ba4c2c064 /cache.h
parentb3920bbdc51fc360bde70e7c19088acfe44b9c4b (diff)
downloadgit-645a29c40a12a4ade1b041dce246ae241c502a64.zip
git-645a29c40a12a4ade1b041dce246ae241c502a64.tar.gz
git-645a29c40a12a4ade1b041dce246ae241c502a64.tar.bz2
parse_pathspec: make sure the prefix part is wildcard-free
Prepending prefix to pathspec is a trick to workaround the fact that commands can be executed in a subdirectory, but all git commands run at worktree's root. The prefix part should always be treated as literal string. Make it so. 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, 2 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index b0ed117..13e3c94 100644
--- a/cache.h
+++ b/cache.h
@@ -414,6 +414,7 @@ extern void setup_work_tree(void);
extern const char *setup_git_directory_gently(int *);
extern const char *setup_git_directory(void);
extern char *prefix_path(const char *prefix, int len, const char *path);
+extern char *prefix_path_gently(const char *prefix, int len, int *remaining, 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,
@@ -741,6 +742,7 @@ const char *real_path(const char *path);
const char *real_path_if_valid(const char *path);
const char *absolute_path(const char *path);
const char *relative_path(const char *abs, const char *base);
+int normalize_path_copy_len(char *dst, const char *src, int *prefix_len);
int normalize_path_copy(char *dst, const char *src);
int longest_ancestor_length(const char *path, struct string_list *prefixes);
char *strip_path_suffix(const char *path, const char *suffix);