Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix normal merge in examples/pull.rs #1091

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant