diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java index 10ebef463..f1191a459 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java @@ -232,7 +232,8 @@ public class Main { if (gitDir.isDirectory()) return gitDir; current = current.getParentFile(); - if (ceilingDirectories.contains(current.getPath())) + if (current != null + && ceilingDirectories.contains(current.getPath())) break; } return null;