Selaa lähdekoodia

Fix empty block corner case in PatienceDiff

There is a corner case where we get an EMPTY region during recursion,
but we didn't expect to receive that.  Its harmless to ignore the
region since the region is empty and has no content, so do so rather
than throwing an exception

Change-Id: I50dcec81ecba763072bb739adfab5879fb48b23a
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
tags/v0.10.1
Shawn O. Pearce 13 vuotta sitten
vanhempi
commit
4fc50df97d
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2
    0
      org.eclipse.jgit/src/org/eclipse/jgit/diff/PatienceDiff.java

+ 2
- 0
org.eclipse.jgit/src/org/eclipse/jgit/diff/PatienceDiff.java Näytä tiedosto

@@ -182,6 +182,8 @@ public class PatienceDiff extends DiffAlgorithm {
break;

case EMPTY:
break;

default:
throw new IllegalStateException();
}

Loading…
Peruuta
Tallenna