Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 521c0ca

Browse files
committed
merge: talk about the merging state after git_merge()
Since it's not necessarily obvious, mention the merging state and how to clear it.
1 parent 264d74f commit 521c0ca

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/git2/merge.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,11 @@ GIT_EXTERN(int) git_merge_commits(
486486
* to the index. Callers should inspect the repository's index after this
487487
* completes, resolve any conflicts and prepare a commit.
488488
*
489+
* For compatibility with git, the repository is put into a merging
490+
* state. Once the commit is done (or if the uses wishes to abort),
491+
* you should clear this state by calling
492+
* `git_repository_state_cleanup()`.
493+
*
489494
* @param repo the repository to merge
490495
* @param their_heads the heads to merge into
491496
* @param their_heads_len the number of heads to merge

0 commit comments

Comments
 (0)