summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-04-26 10:15:54 -0700
committerJunio C Hamano <junkio@cox.net>2006-04-26 12:16:21 -0700
commite23d0b4a4a55cc07e133905f0e9526b3550dd61b (patch)
tree515672854c5dd676564edf9d73792129d62f9ecc /cache.h
parentb176e6ba5bc37466ffcb6c8c0f38c47ec6e9e73a (diff)
downloadgit-e23d0b4a4a55cc07e133905f0e9526b3550dd61b.tar.gz
Fix filename verification when in a subdirectory
When we are in a subdirectory of a git archive, we need to take the prefix of that subdirectory into accoung when we verify filename arguments. Noted by Matthias Lederhofer This also uses the improved error reporting for all the other git commands that use the revision parsing interfaces, not just git-rev-parse. Also, it makes the error reporting for mixed filenames and argument flags clearer (you cannot put flags after the start of the pathname list). [jc: with fix to a trivial typo noticed by Timo Hirvonen] Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 69801b02d5..4d8fabc6d8 100644
--- a/cache.h
+++ b/cache.h
@@ -134,6 +134,7 @@ 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 const char *prefix_filename(const char *prefix, int len, const char *path);
+extern void verify_filename(const char *prefix, const char *name);
#define alloc_nr(x) (((x)+16)*3/2)