summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorDaniel Barkalow <barkalow@iabervon.org>2008-06-05 23:15:19 -0400
committerJunio C Hamano <gitster@pobox.com>2008-06-06 11:23:10 -0700
commit1b9a9467f8b9a8da2fe58d10ae16779492aa7737 (patch)
treec15c63ad7811864c4845e3466e25431a98202cfd /cache.h
parent9e1f0a85c68323830ea117092c55192b17aa3ac8 (diff)
downloadgit-1b9a9467f8b9a8da2fe58d10ae16779492aa7737.tar.gz
Use nonrelative paths instead of absolute paths for cloned repositories
Particularly for the "alternates" file, if one will be created, we want a path that doesn't depend on the current directory, but we want to retain any symlinks in the path as given and any in the user's view of the current directory when the path was given. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> 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 092a997b07..0a63c0eae6 100644
--- a/cache.h
+++ b/cache.h
@@ -524,6 +524,7 @@ static inline int is_absolute_path(const char *path)
return path[0] == '/';
}
const char *make_absolute_path(const char *path);
+const char *make_nonrelative_path(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 *);