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

[PATCH 1/2] Document git config getter return value.

From
Han-Wen Nienhuys <hanwen@google.com>
Date
Jul 30, 2018, 12:26 UTC
Message-ID
<20180730122609.57058-1-hanwen@google.com>
---
 config.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/config.h b/config.h
index b95bb7649..d39256eb1 100644
--- a/config.h
+++ b/config.h
@@ -178,11 +178,16 @@ struct config_set {
 };

 extern void git_configset_init(struct config_set *cs);
-extern int git_configset_add_file(struct config_set *cs, const char *filename);
-extern int git_configset_get_value(struct config_set *cs, const char *key, const char **value);
+
 extern const struct string_list *git_configset_get_value_multi(struct config_set *cs, const char *key);
 extern void git_configset_clear(struct config_set *cs);
+
+/*
+ * The int return values in these functions is 1 if not found, 0 if found, leaving
+ * the found value in the 'dest' pointer.
+ */
+extern int git_configset_add_file(struct config_set *cs, const char *filename);
+extern int git_configset_get_value(struct config_set *cs, const char *key, const char **dest);
 extern int git_configset_get_string_const(struct config_set *cs, const char *key, const char **dest);
 extern int git_configset_get_string(struct config_set *cs, const char *key, char **dest);
 extern int git_configset_get_int(struct config_set *cs, const char *key, int *dest);
--
2.18.0.345.g5c9ce644c3-goog
Next: Han-Wen Nienhuys
Message 1 of 4 in “Document git config getter return value.”
  1. 1/2 Document git config getter return value.Han-Wen Nienhuys, Jul 30, 2018
  2. 2/2 Highlight keywords in remote sideband output.Han-Wen Nienhuys, Jul 30, 2018
  3. Eric SunshineJul 30, 2018
  4. Junio C HamanoJul 30, 2018

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.