From 546e0fd9e918b2ea3d9943124641d3b6af59a4fe Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 21 Jun 2012 14:09:50 -0400 Subject: diff: handle relative paths in no-index When diff-no-index is given a relative path to a file outside the repository, it aborts with error. However, if the file is given using an absolute path, the diff runs as expected. The two cases should be treated the same. Tests and commit message by Tim Henigan. Signed-off-by: Jeff King Signed-off-by: Tim Henigan Signed-off-by: Junio C Hamano --- cache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 84b822974..8e691957e 100644 --- a/cache.h +++ b/cache.h @@ -455,6 +455,7 @@ 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); extern void verify_non_filename(const char *prefix, const char *name); +extern int path_inside_repo(const char *prefix, const char *path); #define INIT_DB_QUIET 0x0001 -- cgit v1.2.1