summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/gitblit/GitBlit.java3
-rw-r--r--src/com/gitblit/models/RepositoryModel.java4
2 files changed, 7 insertions, 0 deletions
diff --git a/src/com/gitblit/GitBlit.java b/src/com/gitblit/GitBlit.java
index 1ebc4c70..63489643 100644
--- a/src/com/gitblit/GitBlit.java
+++ b/src/com/gitblit/GitBlit.java
@@ -1270,6 +1270,9 @@ public class GitBlit implements ServletContextListener {
Constants.CONFIG_GITBLIT, null, "federationSets")));
model.isFederated = getConfig(config, "isFederated", false);
model.origin = config.getString("remote", "origin", "url");
+ if (model.origin != null) {
+ model.origin = model.origin.replace('\\', '/');
+ }
model.preReceiveScripts = new ArrayList<String>(Arrays.asList(config.getStringList(
Constants.CONFIG_GITBLIT, null, "preReceiveScript")));
model.postReceiveScripts = new ArrayList<String>(Arrays.asList(config.getStringList(
diff --git a/src/com/gitblit/models/RepositoryModel.java b/src/com/gitblit/models/RepositoryModel.java
index a28536d1..65629faf 100644
--- a/src/com/gitblit/models/RepositoryModel.java
+++ b/src/com/gitblit/models/RepositoryModel.java
@@ -148,6 +148,10 @@ public class RepositoryModel implements Serializable, Comparable<RepositoryModel
return StringUtils.compareRepositoryNames(name, o.name);
}
+ public boolean isFork() {
+ return !StringUtils.isEmpty(originRepository);
+ }
+
public boolean isPersonalRepository() {
return !StringUtils.isEmpty(projectPath) && projectPath.charAt(0) == '~';
}