summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-03-29 11:14:42 -0400
committerJames Moger <james.moger@gitblit.com>2013-03-29 11:14:42 -0400
commitea4769096f9f303964107e2c3d95c63857588fc5 (patch)
tree18ba66381f04eee38f5eb9b3868edf48a9013f1b /src/main/java
parentf5654729757eedefc1c656ac4be764b6a19ada2e (diff)
downloadgitblit-ea4769096f9f303964107e2c3d95c63857588fc5.tar.gz
gitblit-ea4769096f9f303964107e2c3d95c63857588fc5.zip
Fixed regression with individually symlinked repositories (issue 217)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/gitblit/GitBlit.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/GitBlit.java b/src/main/java/com/gitblit/GitBlit.java
index 7c6a5350..65dc559c 100644
--- a/src/main/java/com/gitblit/GitBlit.java
+++ b/src/main/java/com/gitblit/GitBlit.java
@@ -1656,6 +1656,11 @@ public class GitBlit implements ServletContextListener {
} else {
model.name = com.gitblit.utils.FileUtils.getRelativePath(basePath, r.getDirectory().getParentFile());
}
+ if (StringUtils.isEmpty(model.name)) {
+ // Repository is NOT located relative to the base folder because it
+ // is symlinked. Use the provided repository name.
+ model.name = repositoryName;
+ }
model.hasCommits = JGitUtils.hasCommits(r);
model.lastChange = JGitUtils.getLastChange(r);
model.projectPath = StringUtils.getFirstPathElement(repositoryName);