path: drop git_path_buf()
in favor of repo_git_path_replace()
Remove `git_path_buf()` in favor of `repo_git_path_replace()`. The latter does essentially the same, with the only exception that it does not rely on `the_repository` but takes the repo as separate parameter. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
bba59f58a4
commit
3859e39659
@ -50,15 +50,15 @@ void probe_utf8_pathname_composition(void)
|
||||
int output_fd;
|
||||
if (precomposed_unicode != -1)
|
||||
return; /* We found it defined in the global config, respect it */
|
||||
git_path_buf(&path, "%s", auml_nfc);
|
||||
repo_git_path_replace(the_repository, &path, "%s", auml_nfc);
|
||||
output_fd = open(path.buf, O_CREAT|O_EXCL|O_RDWR, 0600);
|
||||
if (output_fd >= 0) {
|
||||
close(output_fd);
|
||||
git_path_buf(&path, "%s", auml_nfd);
|
||||
repo_git_path_replace(the_repository, &path, "%s", auml_nfd);
|
||||
precomposed_unicode = access(path.buf, R_OK) ? 0 : 1;
|
||||
git_config_set("core.precomposeunicode",
|
||||
precomposed_unicode ? "true" : "false");
|
||||
git_path_buf(&path, "%s", auml_nfc);
|
||||
repo_git_path_replace(the_repository, &path, "%s", auml_nfc);
|
||||
if (unlink(path.buf))
|
||||
die_errno(_("failed to unlink '%s'"), path.buf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user