-
-
Notifications
You must be signed in to change notification settings - Fork 401
index: map git_index_conflict_add #1382
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
base: master
Are you sure you want to change the base?
Conversation
map libgit2's git_index_conflict_add() as Index.add_conflict().
0e1538c
to
7e00418
Compare
Interesting that it failed for macos (and that the feedback already tips that it might be a problem in libgit2). |
err = C.git_index_conflict_add( | ||
self._index, centry_ancestor, centry_ours, centry_theirs | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there something to do with the centries
after using them in git_index_conflict_add()
?
Reading cffi's documentation, centries will be garbage collected, so there is nothing to do with it. |
What do you mean? I don't see a clue about libgit2 here: conflict = index.conflicts['conflict.txt']
> assert conflict[0].id == ancestor_blob_id
^^^^^^^^^^^^^^
E AttributeError: 'NoneType' object has no attribute 'id'
test/test_index.py:331: AttributeError |
It is not me who tipped about
And given that the other platforms pass having the exact same code on pygit2 (and not much room for behavior differences there), I can only assume that the call to libgit2's Just in case, what should be the right way to handle this? Should I go into libgit2, find the root cause of the test failure there, fix it and create a PR? It could get tricky given that I do not have a mac at hand so all I could do is just read code and try to make some (theoretical) sense as to why it might be failing. |
map libgit2's
git_index_conflict_add()
asIndex.add_conflict()
.