James Moger
2012-10-03 e0af48ea57e60a88cf5be3b2d52223cba5bbf277
Fix fork detection on Windows
2 files modified
7 ■■■■■ changed files
src/com/gitblit/GitBlit.java 3 ●●●●● patch | view | raw | blame | history
src/com/gitblit/models/RepositoryModel.java 4 ●●●● patch | view | raw | blame | history
src/com/gitblit/GitBlit.java
@@ -1270,6 +1270,9 @@
                    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(
src/com/gitblit/models/RepositoryModel.java
@@ -148,6 +148,10 @@
        return StringUtils.compareRepositoryNames(name, o.name);
    }
    
    public boolean isFork() {
        return !StringUtils.isEmpty(originRepository);
    }
    public boolean isPersonalRepository() {
        return !StringUtils.isEmpty(projectPath) && projectPath.charAt(0) == '~';
    }