summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorDavid Reiss <dreiss@facebook.com>2008-05-19 23:48:54 -0700
committerJunio C Hamano <gitster@pobox.com>2008-05-23 14:11:20 -0700
commitae299be0e5e610027e6492d48d70c1cbb0e9edd8 (patch)
tree247e12f709c96df4eea12e5759c689a630b02143 /cache.h
parent377d9c409ffe0f0d994b929aeb94716139207b9d (diff)
downloadgit-ae299be0e5e610027e6492d48d70c1cbb0e9edd8.tar.gz
Implement normalize_absolute_path
normalize_absolute_path removes several oddities form absolute paths, giving nice clean paths like "/dir/sub1/sub2". Also add a test case for this utility, based on a new test program (in the style of test-sha1). Signed-off-by: David Reiss <dreiss@facebook.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 093f04cec0..88c390d9f1 100644
--- a/cache.h
+++ b/cache.h
@@ -514,6 +514,7 @@ static inline int is_absolute_path(const char *path)
return path[0] == '/';
}
const char *make_absolute_path(const char *path);
+int normalize_absolute_path(char *buf, const char *path);
/* Read and unpack a sha1 file into memory, write memory to a sha1 file */
extern int sha1_object_info(const unsigned char *, unsigned long *);