mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
examples: adjust merge to git_commit_create_on
This should be a good place to eventually make use of `_fromstate` depending on what we're trying to show in this example.
This commit is contained in:
@@ -285,12 +285,12 @@ static int create_merge_commit(git_repository *repo, git_index *index, merge_opt
|
||||
check_lg2(git_tree_lookup(&tree, repo, &tree_oid), "failed to lookup tree", NULL);
|
||||
|
||||
/* Commit time ! */
|
||||
err = git_commit_create(&commit_oid,
|
||||
repo, git_reference_name(head_ref),
|
||||
sign, sign,
|
||||
NULL, msg,
|
||||
tree,
|
||||
opts->annotated_count + 1, (const git_commit **)parents);
|
||||
err = git_commit_create_on(&commit_oid,
|
||||
repo, git_reference_name(head_ref),
|
||||
sign, sign,
|
||||
NULL, msg,
|
||||
tree,
|
||||
opts->annotated_count + 1, (const git_commit **)parents);
|
||||
check_lg2(err, "failed to create commit", NULL);
|
||||
|
||||
/* We're done merging, cleanup the repository state */
|
||||
|
||||
Reference in New Issue
Block a user