Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Explicitly handle GIT_DELTA_CONFLICTED in git_diff_merge() #3228

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

Merged
merged 1 commit into from
Jun 23, 2015

Conversation

swisspol
Copy link
Contributor

(see commit message)

@swisspol
Copy link
Contributor Author

Can someone restart the Travis build? Looking at the logs, seems like a CI problem.

@carlosmn
Copy link
Member

What was happening before? Is there some test which covers this situation?

@swisspol
Copy link
Contributor Author

Before it would create a hybrid git_diff_delta between the from and to ones, just because it wasn't special-cased like GIT_DELTA_UNMODIFIED or GIT_DELTA_DELETED. I'll see if I can put a test case together.

This fixes a bug where if a file was in conflicted state in either diff,
it would not always remain in conflicted state in the merged diff.
@swisspol
Copy link
Contributor Author

Added unit test and rebased.

The issue was actually bigger than I originally thought as a conflicted file in the index, but not existing in the workdir, could be reported as ADDED after merging the diffs (HEAD -> index -> workdir) instead of CONFLICTED.

carlosmn added a commit that referenced this pull request Jun 23, 2015
Explicitly handle GIT_DELTA_CONFLICTED in git_diff_merge()
@carlosmn carlosmn merged commit 0c34fa5 into libgit2:master Jun 23, 2015
@swisspol swisspol deleted the diff_merge branch June 23, 2015 14:42
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