mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 05:28:34 +00:00
commit
ae26c4b80f
@ -1210,8 +1210,11 @@ static int config_write(diskfile_backend *cfg, const char *key, const regex_t *p
|
||||
write_start = data_start;
|
||||
|
||||
/* Lock the file */
|
||||
if ((result = git_filebuf_open(&file, cfg->file_path, 0, GIT_CONFIG_FILE_MODE)) < 0)
|
||||
return result;
|
||||
if ((result = git_filebuf_open(
|
||||
&file, cfg->file_path, 0, GIT_CONFIG_FILE_MODE)) < 0) {
|
||||
git_buf_free(&reader->buffer);
|
||||
return result;
|
||||
}
|
||||
|
||||
skip_bom(reader);
|
||||
ldot = strrchr(key, '.');
|
||||
|
@ -1477,6 +1477,8 @@ void test_diff_workdir__with_stale_index(void)
|
||||
cl_git_pass(git_diff_foreach(
|
||||
diff, diff_file_cb, diff_hunk_cb, diff_line_cb, &exp));
|
||||
|
||||
git_diff_free(diff);
|
||||
|
||||
cl_assert_equal_i(16, exp.files);
|
||||
cl_assert_equal_i(0, exp.file_status[GIT_DELTA_ADDED]);
|
||||
cl_assert_equal_i(3, exp.file_status[GIT_DELTA_DELETED]);
|
||||
|
Loading…
Reference in New Issue
Block a user