diff options
author | Brandon Williams <bmwill@google.com> | 2016-12-12 10:16:53 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-12-12 15:22:32 -0800 |
commit | a1ae48410dce23c1e81e76aabaeb4eb01b065763 (patch) | |
tree | 89bb3be2d33464d8817e39d6b9be11d520db0993 /cache.h | |
parent | real_path: resolve symlinks by hand (diff) | |
download | tgif-a1ae48410dce23c1e81e76aabaeb4eb01b065763.tar.xz |
real_path: convert real_path_internal to strbuf_realpath
Change the name of real_path_internal to strbuf_realpath. In addition
push the static strbuf up to its callers and instead take as a
parameter a pointer to a strbuf to use for the final result.
This change makes strbuf_realpath reentrant.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1064,6 +1064,8 @@ static inline int is_absolute_path(const char *path) return is_dir_sep(path[0]) || has_dos_drive_prefix(path); } int is_directory(const char *); +char *strbuf_realpath(struct strbuf *resolved, const char *path, + int die_on_error); const char *real_path(const char *path); const char *real_path_if_valid(const char *path); const char *absolute_path(const char *path); |