Closed jorio closed 5 months ago
@jorio Shouldn't this:
def merge_commits(
[...]
file_flags = MergeFavor.NORMAL,
https://github.com/libgit2/pygit2/blob/master/pygit2/repository.py#L700
be MergeFileFlag.DEFAULT
?
@jdavid My bad, you're right (it resolves to 0 either way so the tests didn't fail). PR https://github.com/libgit2/pygit2/pull/1272 fixes this.
Merge functions now use new enums: MergeFavor, MergeFlag, MergeFileFlag.
These functions used to take a dict of strings to boolean flags (e.g.
flags={'no_recursive': True}
). Backward compatibility with this system was kept, and there are unit tests for that too.As far as I'm aware, this system was only used in the merge functions and not anywhere else in pygit2. So, this PR aims to make these functions more consistent with the rest of the library, now that we use enums elsewhere.