|
19 | 19 |
|
20 | 20 | package org.commonwl.view.git;
|
21 | 21 |
|
22 |
| -import static org.apache.jena.ext.com.google.common.io.Files.createTempDir; |
23 |
| - |
24 |
| -import java.io.IOException; |
25 |
| -import java.net.URI; |
26 |
| -import java.net.URISyntaxException; |
27 |
| -import java.nio.file.Files; |
28 |
| -import java.nio.file.Path; |
29 |
| -import java.util.HashSet; |
30 |
| -import java.util.Set; |
31 |
| - |
32 | 22 | import org.apache.commons.codec.digest.DigestUtils;
|
33 | 23 | import org.commonwl.view.researchobject.HashableAgent;
|
34 | 24 | import org.eclipse.jgit.api.Git;
|
|
43 | 33 | import org.springframework.beans.factory.annotation.Value;
|
44 | 34 | import org.springframework.stereotype.Service;
|
45 | 35 |
|
| 36 | +import java.io.IOException; |
| 37 | +import java.net.URI; |
| 38 | +import java.net.URISyntaxException; |
| 39 | +import java.nio.file.Files; |
| 40 | +import java.nio.file.Path; |
| 41 | +import java.util.HashSet; |
| 42 | +import java.util.Set; |
| 43 | + |
| 44 | +import static org.apache.jena.ext.com.google.common.io.Files.createTempDir; |
| 45 | + |
46 | 46 | /**
|
47 | 47 | * Handles Git related functionality
|
48 | 48 | */
|
@@ -82,6 +82,7 @@ public Git getRepository(GitDetails gitDetails, boolean reuseDir)
|
82 | 82 | // Check if folder already exists
|
83 | 83 | Path repoDir = gitStorage.resolve(baseName);
|
84 | 84 | if (Files.isReadable(repoDir) && Files.isDirectory(repoDir)) {
|
| 85 | + repo = Git.open(repoDir.toFile()); |
85 | 86 | repo.fetch().call();
|
86 | 87 | } else {
|
87 | 88 | // Create a folder and clone repository into it
|
|
0 commit comments