Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Allow passing merge options to merge #1192

Merged
merged 4 commits into from
Feb 21, 2023
Merged

Conversation

rohitsanj
Copy link
Contributor

@rohitsanj rohitsanj commented Feb 18, 2023

This PR reimplements the merge method using cffi and removes the C implementation.

In addition, the merge method will now accept additional arguments favor, flags and file_flags to have more control over merge options.

The existing merge tests pass. I'm not sure what other cases need to be tested.

pygit2/repository.py Outdated Show resolved Hide resolved
Copy link
Member

@jdavid jdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rebase and squash?
(When syncing changes from master prefer rebase over merge)

pygit2/repository.py Outdated Show resolved Hide resolved
@jdavid
Copy link
Member

jdavid commented Feb 20, 2023

Looks good, do you think you could add unit tests for the options?
There are similar unit tests for other parts of the API, e.g. test_merge_commits_favor

@rohitsanj
Copy link
Contributor Author

Sure, I can add unit tests.

I was confident about the functionality of the merge options passthrough in this implementation since the _merge_options method seems decently unit tested.

@jdavid jdavid merged commit 8259427 into libgit2:master Feb 21, 2023
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.

2 participants