Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2013-11-05 15:01:14 +0400
committernulltoken <emeric.fermas@gmail.com>2013-11-05 17:03:51 +0400
commite8162fd091bbfd49fc5aaa60794a0a3558e895bb (patch)
treeac3458ed080f0f6d1d90921b5f72b7ab1114034b /src/config_file.c
parent3ae66ef1af2af9132c96c57bf5c6e2cfdb1f617c (diff)
Propagate ELOCKED error when updating the config
Diffstat (limited to 'src/config_file.c')
-rw-r--r--src/config_file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config_file.c b/src/config_file.c
index 40dcc5a37..9b4a7c1b6 100644
--- a/src/config_file.c
+++ b/src/config_file.c
@@ -385,10 +385,10 @@ static int config_set(git_config_backend *cfg, const char *name, const char *val
GITERR_CHECK_ALLOC(esc_value);
}
- if (config_write(b, key, NULL, esc_value) < 0) {
+ if ((ret = config_write(b, key, NULL, esc_value)) < 0) {
git__free(esc_value);
cvar_free(var);
- return -1;
+ return ret;
}
git__free(esc_value);
@@ -1210,8 +1210,8 @@ static int config_write(diskfile_backend *cfg, const char *key, const regex_t *p
write_start = data_start;
/* Lock the file */
- if (git_filebuf_open(&file, cfg->file_path, 0, GIT_CONFIG_FILE_MODE) < 0)
- return -1;
+ if ((result = git_filebuf_open(&file, cfg->file_path, 0, GIT_CONFIG_FILE_MODE)) < 0)
+ return result;
skip_bom(reader);
ldot = strrchr(key, '.');