Re: [PATCH 1/2] Document git config getter return value.
On Tue, Jul 31, 2018 at 1:37 PM Han-Wen Nienhuys wrote: > diff --git a/config.h b/config.h > @@ -178,10 +178,16 @@ struct config_set { > +/* > + * The int return values in the functions is 1 if not found, 0 if found, > leaving > + * the found value in teh 'dest' pointer. > + */ "teh"? Instead of talking about "the int return values", simpler would be to say "returns 1 if ...; else 0". Not worth a re-roll, though. > +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);
[PATCH 1/2] Document git config getter return value.
--- 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,10 +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 the functions is 1 if not found, 0 if found, leaving + * the found value in teh '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
Re: [PATCH 1/2] Document git config getter return value.
Eric Sunshine writes: > On Mon, Jul 30, 2018 at 8:26 AM Han-Wen Nienhuys wrote: >> --- >> config.h | 10 -- >> 1 file changed, 8 insertions(+), 2 deletions(-) > > Missing sign-off. Besides, the patch is corrupt in that it miscounts both preimage and postimage lines and claims it applies to a 11-line block even though there are only 10 lines there.
Re: [PATCH 1/2] Document git config getter return value.
On Mon, Jul 30, 2018 at 8:26 AM Han-Wen Nienhuys wrote: > --- > config.h | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) Missing sign-off.
[PATCH 1/2] Document git config getter return value.
--- 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
[PATCH 1/2] Document git config getter return value.
--- 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