summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
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 */