diff --git a/config.c b/config.c
index 0c43d7615b68cb41b60a140bdcf26559b24cc3e0..5b5a9a2e4c49026db7fcb9953a0ed25432de24e0 100644 (file)
--- a/config.c
+++ b/config.c
#define MAXNAME (256)
static FILE *config_file;
#define MAXNAME (256)
static FILE *config_file;
-static char *config_file_name;
+static const char *config_file_name;
static int config_linenr;
static int get_next_char(void)
{
static int config_linenr;
static int get_next_char(void)
{
return 0;
}
return 0;
}
+ if (!strcmp(var, "i18n.commitencoding")) {
+ strncpy(git_commit_encoding, value, sizeof(git_commit_encoding));
+ return 0;
+ }
+
/* Add other config variables here.. */
return 0;
}
/* Add other config variables here.. */
return 0;
}
* If .git/config does not exist yet, write a minimal version.
*/
if (stat(config_filename, &st)) {
* If .git/config does not exist yet, write a minimal version.
*/
if (stat(config_filename, &st)) {
- static const char contents[] =
- "#\n"
- "# This is the config file\n"
- "#\n"
- "\n";
-
free(store.key);
/* if nothing to unset, error out */
free(store.key);
/* if nothing to unset, error out */
}
store.key = (char*)key;
}
store.key = (char*)key;
-
- write(fd, contents, sizeof(contents)-1);
store_write_section(fd, key);
store_write_pair(fd, key, value);
} else{
store_write_section(fd, key);
store_write_pair(fd, key, value);
} else{