diff options
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/diff.c b/src/diff.c index 9c0b45f8e..83e73cd03 100644 --- a/src/diff.c +++ b/src/diff.c @@ -589,18 +589,13 @@ int git_diff__from_iterators( goto fail; if (diff->opts.flags & GIT_DIFF_DELTAS_ARE_ICASE) { - /* If one of the iterators doesn't have ignore_case set, - * then that's unfortunate because we'll have to spool - * its data, sort it icase, and then use that for our - * merge join to the other iterator that is icase sorted */ - if (!old_iter->ignore_case && - git_iterator_spoolandsort( - &old_iter, old_iter, diff->entrycomp, true) < 0) - goto fail; - - if (!new_iter->ignore_case && - git_iterator_spoolandsort( - &new_iter, new_iter, diff->entrycomp, true) < 0) + /* If either iterator does not have ignore_case set, then we will + * spool its data, sort it icase, and use that for the merge join + * with the other iterator which was icase sorted. This call is + * a no-op on an iterator that already matches "ignore_case". + */ + if (git_iterator_spoolandsort_push(old_iter, true) < 0 || + git_iterator_spoolandsort_push(new_iter, true) < 0) goto fail; } |