Skip to content

Commit 2f29c1b

Browse files
pks-tgitster
authored andcommitted
compat: die when unable to set core.precomposeunicode
When calling `git_config_set` to set 'core.precomposeunicode' we ignore the return value of the function, which may indicate that we were unable to write the value back to disk. As the function is only called by init-db we can and should die when an error occurs. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6c24dfb commit 2f29c1b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compat/precompose_utf8.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ void probe_utf8_pathname_composition(void)
5050
close(output_fd);
5151
git_path_buf(&path, "%s", auml_nfd);
5252
precomposed_unicode = access(path.buf, R_OK) ? 0 : 1;
53-
git_config_set("core.precomposeunicode", precomposed_unicode ? "true" : "false");
53+
git_config_set_or_die("core.precomposeunicode",
54+
precomposed_unicode ? "true" : "false");
5455
git_path_buf(&path, "%s", auml_nfc);
5556
if (unlink(path.buf))
5657
die_errno(_("failed to unlink '%s'"), path.buf);

0 commit comments

Comments
 (0)