real_path: clarify return value ownership

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Han-Wen Nienhuys 2017-09-26 13:21:48 +02:00 committed by Junio C Hamano
parent 7451fcdc0d
commit d83d846e84
1 changed files with 4 additions and 0 deletions

View File

@ -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;