git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] real_path: clarify return value ownership

From
Han-Wen Nienhuys <hanwen@google.com>
Date
Sep 26, 2017, 11:21 UTC
Message-ID
<20170926112150.21850-2-hanwen@google.com>
In-Reply-To
<20170926112150.21850-1-hanwen@google.com>
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
---
 abspath.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/abspath.c b/abspath.c
index 708aff8d4..985798532 100644
--- a/abspath.c
+++ b/abspath.c
@@ -202,6 +202,10 @@ char *strbuf_realpath(struct strbuf *resolved, const char *path,
 	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;
-- 
2.14.1.821.g8fa685d3b7-goog
Previous: Han-Wen NienhuysNext: Han-Wen Nienhuys
Message 2 of 6 in “Comment fixes”
  1. 0/3 Comment fixesHan-Wen Nienhuys, Sep 26, 2017
  2. 1/3 real_path: clarify return value ownershipHan-Wen Nienhuys, Sep 26, 2017
  3. 2/3 read_gitfile_gently: clarify return value ownership.Han-Wen Nienhuys, Sep 26, 2017
  4. 3/3 string-list.h: move documentation from Documentation/api/ into headerHan-Wen Nienhuys, Sep 26, 2017
  5. Junio C HamanoSep 27, 2017
  6. Brandon WilliamsOct 2, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.