Skip to content

Conversation

luveti
Copy link

@luveti luveti commented Oct 14, 2024

Repository::commit needs to be called, otherwise the index gets goofed up.

In my specific case, it resulted in a file created in a fetched commit being staged for deletion.

https://libgit2.org/libgit2/ex/HEAD/merge.html was referenced for this fix.

I also added a call to Repository::cleanup_state that was used in the libgit2 example. They did not call Repository::checkout_head so I've removed that.

`Repository::commit` needs to be called, otherwise the index gets goofed up.

In my specific case, it resulted in a file created in a fetched commit being staged for deletion.

https://libgit2.org/libgit2/ex/HEAD/merge.html was referenced for this fix.

I also added a call to `Repository::cleanup_state` that was used in the libgit2 example. They did not call `Repository::checkout_head` so I've removed that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant