commit - 6b78ad28aa9fd55e0c2ae44dea662944bbc279d7
commit + 49d691e8618234a8b0f8d05a1df882c31603644e
blob - 5df90993cba5c1a4d76ffb9c84b57b860a51ed11
blob + 79337138861c4aa917c6cbb1552a0743dde3a958
--- lib/gitconfig.c
+++ lib/gitconfig.c
};
static __inline__ u_int8_t
-conf_hash(char *s)
+conf_hash(const char *s)
{
u_int8_t hash = 0;
* if that tag does not exist.
*/
int
-got_gitconfig_get_num(struct got_gitconfig *conf, char *section, char *tag,
- int def)
+got_gitconfig_get_num(struct got_gitconfig *conf, const char *section,
+ const char *tag, int def)
{
char *value = got_gitconfig_get_str(conf, section, tag);
/* Return the string value denoted by TAG in section SECTION. */
char *
-got_gitconfig_get_str(struct got_gitconfig *conf, char *section, char *tag)
+got_gitconfig_get_str(struct got_gitconfig *conf, const char *section,
+ const char *tag)
{
struct got_gitconfig_binding *cb;
}
struct got_gitconfig_list *
-got_gitconfig_get_tag_list(struct got_gitconfig *conf, char *section)
+got_gitconfig_get_tag_list(struct got_gitconfig *conf, const char *section)
{
struct got_gitconfig_list *list = 0;
struct got_gitconfig_list_node *node = 0;
blob - 615d2690ac39f3fceb3704b2624a85e8de2ba65c
blob + 7bfbb245c1c4fd6b4e56e6e71e28d6253c443930
--- lib/got_lib_gitconfig.h
+++ lib/got_lib_gitconfig.h
struct got_gitconfig_list **, struct got_gitconfig *);
struct got_gitconfig_list *got_gitconfig_get_list(struct got_gitconfig *,
char *, char *);
-struct got_gitconfig_list *got_gitconfig_get_tag_list(struct got_gitconfig *, char *);
-int got_gitconfig_get_num(struct got_gitconfig *, char *, char *,
+struct got_gitconfig_list *got_gitconfig_get_tag_list(struct got_gitconfig *,
+ const char *);
+int got_gitconfig_get_num(struct got_gitconfig *, const char *, const char *,
int);
-char *got_gitconfig_get_str(struct got_gitconfig *, char *,
- char *);
+char *got_gitconfig_get_str(struct got_gitconfig *, const char *,
+ const char *);
const struct got_error *got_gitconfig_open(struct got_gitconfig **, int);
void got_gitconfig_close(struct got_gitconfig *);
int got_gitconfig_match_num(struct got_gitconfig *, char *, char *, int);
blob - 465fc301b0dceaeef13bda6ff6eb82c76ed7eac6
blob + 9820c8bd9e58d215598df363fdb6e25fbd81323d
--- libexec/got-read-gitconfig/got-read-gitconfig.c
+++ libexec/got-read-gitconfig/got-read-gitconfig.c
static const struct got_error *
gitconfig_num_request(struct imsgbuf *ibuf, struct got_gitconfig *gitconfig,
- char *section, char *tag, int def)
+ const char *section, const char *tag, int def)
{
int value;
static const struct got_error *
gitconfig_str_request(struct imsgbuf *ibuf, struct got_gitconfig *gitconfig,
- char *section, char *tag)
+ const char *section, const char *tag)
{
char *value;