mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 20:14:44 +00:00
cherry-pick: terminate the commit id string
We treat this as a NUL-terminated string, so make sure that we add the terminator.
This commit is contained in:
parent
c5cacc4ec2
commit
2bed3553f4
@ -187,7 +187,7 @@ int git_cherry_pick(
|
|||||||
goto on_error;
|
goto on_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
git_oid_fmt(commit_oidstr, git_commit_id(commit));
|
git_oid_nfmt(commit_oidstr, sizeof(commit_oidstr), git_commit_id(commit));
|
||||||
|
|
||||||
if ((error = write_merge_msg(repo, commit_msg)) < 0 ||
|
if ((error = write_merge_msg(repo, commit_msg)) < 0 ||
|
||||||
(error = git_buf_printf(&their_label, "%.7s... %s", commit_oidstr, commit_summary)) < 0 ||
|
(error = git_buf_printf(&their_label, "%.7s... %s", commit_oidstr, commit_summary)) < 0 ||
|
||||||
|
Loading…
Reference in New Issue
Block a user