summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.junit')
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
index 54e4a09ee5..483b9a7c81 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
@@ -276,6 +276,24 @@ public class TestRepository<R extends Repository> implements AutoCloseable {
}
/**
+ * Construct a symlink mode tree entry.
+ *
+ * @param path
+ * path of the symlink.
+ * @param blob
+ * a blob, previously constructed in the repository.
+ * @return the entry.
+ * @throws Exception
+ * @since 6.3
+ */
+ public DirCacheEntry link(String path, RevBlob blob) throws Exception {
+ DirCacheEntry e = new DirCacheEntry(path);
+ e.setFileMode(FileMode.SYMLINK);
+ e.setObjectId(blob);
+ return e;
+ }
+
+ /**
* Construct a tree from a specific listing of file entries.
*
* @param entries