Signed-off-by: Robin Rosenberg <robin.rosenberg@xxxxxxxxxx> --- .../preferences/GitProjectPropertyPage.java | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/preferences/GitProjectPropertyPage.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/preferences/GitProjectPropertyPage.java index 4c97cc8..d3afd97 100644 --- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/preferences/GitProjectPropertyPage.java +++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/preferences/GitProjectPropertyPage.java @@ -94,7 +94,13 @@ private void fillValues(Repository repository) throws IOException { final ObjectId objectId = repository .resolve(repository.getFullBranch()); - id.setText(objectId.name()); + if (objectId == null) { + if (repository.getAllRefs().size() == 0) + id.setText("None (empty repository)"); + else + id.setText("None (unborn branch)"); + } else + id.setText(objectId.name()); } /** -- 1.6.2.2.446.gfbdc0 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html