mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
checkout: use target path; don't assume workdir
We're not necessarily checking out into the working directory. We could be checking out into an arbitrary location. Ensure that when we are writing conflict data that we do it in the checkout target.
This commit is contained in:
@@ -2032,7 +2032,7 @@ static int checkout_merge_path(
|
||||
const char *our_label_raw, *their_label_raw, *suffix;
|
||||
int error = 0;
|
||||
|
||||
if ((error = git_buf_joinpath(out, git_repository_workdir(data->repo), result->path)) < 0)
|
||||
if ((error = git_buf_joinpath(out, data->opts.target_directory, result->path)) < 0)
|
||||
return error;
|
||||
|
||||
/* Most conflicts simply use the filename in the index */
|
||||
|
||||
Reference in New Issue
Block a user