diff options
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java index dcbc37bed6..887ad08af7 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java @@ -341,9 +341,10 @@ class TextHashFunctions extends TextBuiltin { } } - if (db.getDirectory() != null) { - String name = db.getDirectory().getName(); - File parent = db.getDirectory().getParentFile(); + File directory = db.getDirectory(); + if (directory != null) { + String name = directory.getName(); + File parent = directory.getParentFile(); if (name.equals(Constants.DOT_GIT) && parent != null) name = parent.getName(); outw.println(name + ":"); //$NON-NLS-1$ |