diff options
| author | Vicent Marti <tanoku@gmail.com> | 2011-07-04 20:05:11 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2011-07-05 02:06:26 +0200 |
| commit | 5ad739e8328c665b629e2285abaec7e12ea8397c (patch) | |
| tree | be0677bcaeaa318bf20b8fa765e3bf478fb5bc55 /src/path.h | |
| parent | f79026b4912bcd2336667f4c1663c06e233f0b32 (diff) | |
| download | libgit2-5ad739e8328c665b629e2285abaec7e12ea8397c.tar.gz | |
fileops: Drop `git_fileops_prettify_path`
The old `git_fileops_prettify_path` has been replaced with
`git_path_prettify`. This is a much simpler method that uses the OS's
`realpath` call to obtain the full path for directories and resolve
symlinks.
The `realpath` syscall is the original POSIX call in Unix system and
an emulated version under Windows using the Windows API.
Diffstat (limited to 'src/path.h')
| -rw-r--r-- | src/path.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/path.h b/src/path.h index 1bae9dfbe..36e22a768 100644 --- a/src/path.h +++ b/src/path.h @@ -59,6 +59,11 @@ GIT_INLINE(void) git_path_join(char *buffer_out, const char *path_a, const char git_path_join_n(buffer_out, 2, path_a, path_b); } +int git_path_root(const char *path); + +int git_path_prettify(char *path_out, const char *path, const char *base); +int git_path_prettify_dir(char *path_out, const char *path, const char *base); + #ifdef GIT_WIN32 GIT_INLINE(void) git_path_mkposix(char *path) { |
