Skip to content

Allow passing merge options to merge#1192

Merged
jdavid merged 4 commits into
libgit2:masterfrom
rohitsanj:git-merge
Feb 21, 2023
Merged

Allow passing merge options to merge#1192
jdavid merged 4 commits into
libgit2:masterfrom
rohitsanj:git-merge

Conversation

@rohitsanj

@rohitsanj rohitsanj commented Feb 18, 2023

Copy link
Copy Markdown
Contributor

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.

Comment thread pygit2/repository.py Outdated
@rohitsanj rohitsanj requested a review from jdavid February 20, 2023 15:11

@jdavid jdavid left a comment

Copy link
Copy Markdown
Member

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)

Comment thread pygit2/repository.py Outdated
@jdavid

jdavid commented Feb 20, 2023

Copy link
Copy Markdown
Member

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
Copy Markdown
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