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
diff options
context:
space:
mode:
authorDavid Reiss <dreiss@facebook.com>2008-05-20 10:48:54 +0400
committerJunio C Hamano <gitster@pobox.com>2008-05-24 01:11:20 +0400
commitae299be0e5e610027e6492d48d70c1cbb0e9edd8 (patch)
tree247e12f709c96df4eea12e5759c689a630b02143 /cache.h
parent377d9c409ffe0f0d994b929aeb94716139207b9d (diff)
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 *);