Code

user-manual: start revising "internals" chapter
[git.git] / config.c
index a3c7b772bce1d302e60bbf02212bb4ad4da0ee7b..70d105567921fe75518d8d5fe3d3df4aad0659cd 100644 (file)
--- a/config.c
+++ b/config.c
@@ -331,6 +331,11 @@ int git_default_config(const char *var, const char *value)
                return 0;
        }
 
+       if (!strcmp(var, "core.deltabasecachelimit")) {
+               delta_base_cache_limit = git_config_int(var, value);
+               return 0;
+       }
+
        if (!strcmp(var, "core.autocrlf")) {
                if (value && !strcasecmp(value, "input")) {
                        auto_crlf = -1;
@@ -351,12 +356,12 @@ int git_default_config(const char *var, const char *value)
        }
 
        if (!strcmp(var, "i18n.commitencoding")) {
-               git_commit_encoding = strdup(value);
+               git_commit_encoding = xstrdup(value);
                return 0;
        }
 
        if (!strcmp(var, "i18n.logoutputencoding")) {
-               git_log_output_encoding = strdup(value);
+               git_log_output_encoding = xstrdup(value);
                return 0;
        }
 
@@ -911,8 +916,8 @@ int git_config_rename_section(const char *old_name, const char *new_name)
        }
 
        if (!(config_file = fopen(config_filename, "rb"))) {
-               ret = error("Could not open config file!");
-               goto out;
+               /* no config file means nothing to rename, no error */
+               goto unlock_and_out;
        }
 
        while (fgets(buf, sizeof(buf), config_file)) {
@@ -946,6 +951,7 @@ int git_config_rename_section(const char *old_name, const char *new_name)
                }
        }
        fclose(config_file);
+ unlock_and_out:
        if (close(out_fd) || commit_lock_file(lock) < 0)
                        ret = error("Cannot commit config file!");
  out: