diff options
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -448,6 +448,8 @@ int git_default_config(const char *var, const char *value, void *dummy) if (!value) return config_error_nonbool(var); strlcpy(git_default_name, value, sizeof(git_default_name)); + if (git_default_email[0]) + user_ident_explicitly_given = 1; return 0; } @@ -455,6 +457,8 @@ int git_default_config(const char *var, const char *value, void *dummy) if (!value) return config_error_nonbool(var); strlcpy(git_default_email, value, sizeof(git_default_email)); + if (git_default_name[0]) + user_ident_explicitly_given = 1; return 0; } @@ -699,7 +703,7 @@ static int store_write_section(int fd, const char* key) if (dot) { strbuf_addf(&sb, "[%.*s \"", (int)(dot - key), key); for (i = dot - key + 1; i < store.baselen; i++) { - if (key[i] == '"') + if (key[i] == '"' || key[i] == '\\') strbuf_addch(&sb, '\\'); strbuf_addch(&sb, key[i]); } |