diff options
author | David Reiss <dreiss@facebook.com> | 2008-05-19 23:48:54 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-23 14:11:20 -0700 |
commit | ae299be0e5e610027e6492d48d70c1cbb0e9edd8 (patch) | |
tree | 247e12f709c96df4eea12e5759c689a630b02143 /cache.h | |
parent | 377d9c409ffe0f0d994b929aeb94716139207b9d (diff) | |
download | git-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.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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 *); |