summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java2
5 files changed, 7 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java
index cdf8cdd8d7..cf3d35fe89 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java
@@ -274,7 +274,7 @@ public class LogCommand extends GitCommand<Iterable<RevCommit>> {
public LogCommand all() throws IOException {
for (Ref ref : getRepository().getRefDatabase().getRefs()) {
if(!ref.isPeeled())
- ref = getRepository().peel(ref);
+ ref = getRepository().getRefDatabase().peel(ref);
ObjectId objectId = ref.getPeeledObjectId();
if (objectId == null)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
index c8a9049e6c..b8fa74de79 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
@@ -255,7 +255,7 @@ public class MergeCommand extends GitCommand<MergeResult> {
refLogMessage.append(ref.getName());
// handle annotated tags
- ref = repo.peel(ref);
+ ref = repo.getRefDatabase().peel(ref);
ObjectId objectId = ref.getPeeledObjectId();
if (objectId == null)
objectId = ref.getObjectId();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
index 5fb4e40084..fa283d0129 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
@@ -1133,7 +1133,9 @@ public abstract class Repository implements AutoCloseable {
* new Ref object representing the same data as Ref, but isPeeled()
* will be true and getPeeledObjectId will contain the peeled object
* (or null).
+ * @deprecated use {@code getRefDatabase().peel(ref)} instead.
*/
+ @Deprecated
@NonNull
public Ref peel(Ref ref) {
try {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java
index 1bde49df29..dc1871b729 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java
@@ -322,7 +322,7 @@ public abstract class RefAdvertiser {
String peelPart = ""; //$NON-NLS-1$
if (derefTags) {
if (!ref.isPeeled() && repository != null) {
- ref = repository.peel(ref);
+ ref = repository.getRefDatabase().peel(ref);
}
ObjectId peeledObjectId = ref.getPeeledObjectId();
if (peeledObjectId != null) {
@@ -342,7 +342,7 @@ public abstract class RefAdvertiser {
if (!ref.isPeeled()) {
if (repository == null)
continue;
- ref = repository.peel(ref);
+ ref = repository.getRefDatabase().peel(ref);
}
if (ref.getPeeledObjectId() != null)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
index 3d4d279a51..82e6e62f0f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
@@ -1932,7 +1932,7 @@ public class UploadPack {
}
if (!ref.isPeeled())
- ref = db.peel(ref);
+ ref = db.getRefDatabase().peel(ref);
ObjectId peeledId = ref.getPeeledObjectId();
objectId = ref.getObjectId();