From d83d846e84d6ba6c7c4221d2681dfde820949362 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 26 Sep 2017 13:21:48 +0200 Subject: real_path: clarify return value ownership Signed-off-by: Han-Wen Nienhuys Signed-off-by: Junio C Hamano --- abspath.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/abspath.c b/abspath.c index 708aff8d42..9857985329 100644 --- a/abspath.c +++ b/abspath.c @@ -202,6 +202,10 @@ error_out: return retval; } +/* + * Resolve `path` into an absolute, cleaned-up path. The return value + * comes from a shared buffer. + */ const char *real_path(const char *path) { static struct strbuf realpath = STRBUF_INIT; -- cgit v1.2.3 From ea1d87560c5d66396d1785a208783cbf7a1651c2 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 26 Sep 2017 13:21:49 +0200 Subject: read_gitfile_gently: clarify return value ownership. Signed-off-by: Han-Wen Nienhuys Signed-off-by: Junio C Hamano --- setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.c b/setup.c index 6d8380acd2..d777ff34b7 100644 --- a/setup.c +++ b/setup.c @@ -541,7 +541,8 @@ void read_gitfile_error_die(int error_code, const char *path, const char *dir) /* * Try to read the location of the git directory from the .git file, - * return path to git directory if found. + * return path to git directory if found. The return value comes from + * a shared buffer. * * On failure, if return_error_code is not NULL, return_error_code * will be set to an error code and NULL will be returned. If -- cgit v1.2.3