summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-09-09 08:27:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-09-09 16:27:45 (GMT)
commit90b4a71c493bf24f11b5edee8a519110624a6bea (patch)
treebc6b950d4b19ba1aee1292970571ad8744b1267b /cache.h
parent10708a994a632c392ab58aa7d11e49b322aa1505 (diff)
downloadgit-90b4a71c493bf24f11b5edee8a519110624a6bea.zip
git-90b4a71c493bf24f11b5edee8a519110624a6bea.tar.gz
git-90b4a71c493bf24f11b5edee8a519110624a6bea.tar.bz2
is_directory(): a generic helper function
A simple "grep -e stat --and -e S_ISDIR" revealed there are many open-coded implementations of this function. 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 de8c2b6..ce1f630 100644
--- a/cache.h
+++ b/cache.h
@@ -533,6 +533,7 @@ static inline int is_absolute_path(const char *path)
{
return path[0] == '/' || has_dos_drive_prefix(path);
}
+int is_directory(const char *);
const char *make_absolute_path(const char *path);
const char *make_nonrelative_path(const char *path);
const char *make_relative_path(const char *abs, const char *base);