diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-03 15:42:48 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-03 15:42:48 +0900 |
commit | 9de7ae63c53ae050f7061d451174a489fa51c80f (patch) | |
tree | 399b0fca26899b2eb8ddfb68f081098db0ae5af5 | |
parent | Merge branch 'hn/submodule-comment' (diff) | |
parent | read_gitfile_gently: clarify return value ownership. (diff) | |
download | tgif-9de7ae63c53ae050f7061d451174a489fa51c80f.tar.xz |
Merge branch 'hn/path-ownership-comment'
Add comment to a few functions that use a short-lived buffer the
caller can peek and copy out of.
* hn/path-ownership-comment:
read_gitfile_gently: clarify return value ownership.
real_path: clarify return value ownership
-rw-r--r-- | abspath.c | 4 | ||||
-rw-r--r-- | setup.c | 3 |
2 files changed, 6 insertions, 1 deletions
@@ -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; @@ -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 |