From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: spearce@spearce.org
Cc: git@vger.kernel.org, Robin Rosenberg <robin.rosenberg@dewire.com>
Subject: [EGIT PATCH 1/2] Make Git property page cope with empty repositories and not yet born branches
Date: Wed, 8 Apr 2009 17:49:40 +0200 [thread overview]
Message-ID: <1239205781-28009-1-git-send-email-robin.rosenberg@dewire.com> (raw)
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
.../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
next reply other threads:[~2009-04-08 15:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 15:49 Robin Rosenberg [this message]
2009-04-08 15:49 ` [EGIT PATCH 2/2] Externalize strings in GitPropertyPage Robin Rosenberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1239205781-28009-1-git-send-email-robin.rosenberg@dewire.com \
--to=robin.rosenberg@dewire.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).