summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2015-06-23 23:52:03 -0400
committerEdward Thomson <ethomson@edwardthomson.com>2015-06-23 23:52:03 -0400
commitcc605e73acad8b665c3b89a645eae9de4299774b (patch)
treee8430d68e5cde36cefc94b83191218f5b651162b /src/diff.c
parent09f3364d7a9fd061e3c624a1f7b118b312fd825c (diff)
parent8d8a2eefef0fbb42d7a7fb8f88ca7481515e2737 (diff)
downloadlibgit2-cc605e73acad8b665c3b89a645eae9de4299774b.tar.gz
Merge pull request #3222 from git-up/conflicted
Fixed GIT_DELTA_CONFLICTED not returned in some cases
Diffstat (limited to 'src/diff.c')
-rw-r--r--src/diff.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/diff.c b/src/diff.c
index cc93f57cd..12d34a184 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -1090,8 +1090,10 @@ static int handle_unmatched_new_item(
/* item contained in ignored directory, so skip over it */
return iterator_advance(&info->nitem, info->new_iter);
- else if (info->new_iter->type != GIT_ITERATOR_TYPE_WORKDIR)
- delta_type = GIT_DELTA_ADDED;
+ else if (info->new_iter->type != GIT_ITERATOR_TYPE_WORKDIR) {
+ if (delta_type != GIT_DELTA_CONFLICTED)
+ delta_type = GIT_DELTA_ADDED;
+ }
else if (nitem->mode == GIT_FILEMODE_COMMIT) {
/* ignore things that are not actual submodules */