Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2011-03-26 12:04:24 +0300
committerJunio C Hamano <gitster@pobox.com>2011-03-29 04:01:15 +0400
commit9b125da490990ae4d08dd1517dc38b188b874fa8 (patch)
tree1da0d8359926faf97b67946095f5e5e9937186cc /dir.h
parent78bc46675353e4833a59e0f4dfa47d57a9c1a46b (diff)
setup: return correct prefix if worktree is '/'
The same old problem reappears after setup code is reworked. We tend to assume there is at least one path component in a path and forget that path can be simply '/'. Reported-by: Matthijs Kooijman <matthijs@stdin.nl> 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 'dir.h')
-rw-r--r--dir.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/dir.h b/dir.h
index 72a764ed84..86a99ed9c1 100644
--- a/dir.h
+++ b/dir.h
@@ -83,6 +83,7 @@ extern int file_exists(const char *);
extern char *get_relative_cwd(char *buffer, int size, const char *dir);
extern int is_inside_dir(const char *dir);
+extern int dir_inside_of(const char *subdir, const char *dir);
static inline int is_dot_or_dotdot(const char *name)
{