From e0af48ea57e60a88cf5be3b2d52223cba5bbf277 Mon Sep 17 00:00:00 2001 From: James Moger Date: Wed, 3 Oct 2012 17:07:22 -0400 Subject: [PATCH] Fix fork detection on Windows --- src/com/gitblit/GitBlit.java | 3 +++ src/com/gitblit/models/RepositoryModel.java | 4 ++++ 2 files changed, 7 insertions(+) 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(Arrays.asList(config.getStringList( Constants.CONFIG_GITBLIT, null, "preReceiveScript"))); model.postReceiveScripts = new ArrayList(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