summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorCarsten Pfeiffer2011-11-23 07:43:59 (EST)
committer Carsten Pfeiffer2011-11-23 07:43:59 (EST)
commit76c1ee70c62738fbe1141a063240e83958c0d136 (patch)
tree391e0c3ba77beaa28ae049b1b510601c974514db
parent41c850be068559e56ab3bb1e28a09e832b34fe1d (diff)
downloadegit-76c1ee70c62738fbe1141a063240e83958c0d136.zip
egit-76c1ee70c62738fbe1141a063240e83958c0d136.tar.gz
egit-76c1ee70c62738fbe1141a063240e83958c0d136.tar.bz2
Peel the ref before asking for its peeled object idrefs/changes/70/4670/1
We must make sure that the ref is actually peeled; otherwise we only get the peeled object id if someone else has done the peeling already. Change-Id: Iea007d9d20261cf2c31db0d8124d97f9362e33f0 Signed-off-by: Carsten Pfeiffer <carsten.pfeiffer@gebit.de>
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/internal/storage/CommitFileRevision.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/storage/CommitFileRevision.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/storage/CommitFileRevision.java
index 88d0e2f..d177f25 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/storage/CommitFileRevision.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/storage/CommitFileRevision.java
@@ -95,10 +95,11 @@ class CommitFileRevision extends GitFileRevision {
public ITag[] getTags() {
final Collection<GitTag> ret = new ArrayList<GitTag>();
for (final Map.Entry<String, Ref> tag : db.getTags().entrySet()) {
- final ObjectId ref = tag.getValue().getPeeledObjectId();
- if (ref == null)
+ Ref ref = db.peel(tag.getValue());
+ final ObjectId refId = ref.getPeeledObjectId();
+ if (refId == null)
continue;
- if (!AnyObjectId.equals(ref, commit))
+ if (!AnyObjectId.equals(refId, commit))
continue;
ret.add(new GitTag(tag.getKey()));
}