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

Keep path references in merge_file_from_index #520

Merged
merged 1 commit into from
May 3, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions pygit2/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,12 @@ def merge_file_from_index(self, ancestor, ours, theirs):
"""
cmergeresult = ffi.new('git_merge_file_result *')

cancestor = ancestor._to_c()[0] if ancestor is not None else ffi.NULL
cours = ours._to_c()[0] if ours is not None else ffi.NULL
ctheirs = theirs._to_c()[0] if theirs is not None else ffi.NULL
cancestor, ancestor_str_ref = (
ancestor._to_c() if ancestor is not None else (ffi.NULL, ffi.NULL))
cours, ours_str_ref = (
ours._to_c() if ours is not None else (ffi.NULL, ffi.NULL))
ctheirs, theirs_str_ref = (
theirs._to_c() if theirs is not None else (ffi.NULL, ffi.NULL))

err = C.git_merge_file_from_index(
cmergeresult, self._repo,
Expand Down