summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-06-21 14:09:50 -0400
committerJunio C Hamano <gitster@pobox.com>2012-06-22 10:20:18 -0700
commit546e0fd9e918b2ea3d9943124641d3b6af59a4fe (patch)
tree83ca9e34a696e313314729c50c69ae76e389f22b /cache.h
parent785ee4960c3d334cbc2b17ab74d2cebdf1b4db64 (diff)
downloadgit-546e0fd9e918b2ea3d9943124641d3b6af59a4fe.tar.gz
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 <peff@peff.net> Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 84b8229748..8e691957e9 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