From 85e0731a160baf33336596c6c8bb1cb042ac85bc Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Sat, 25 Feb 2012 11:06:47 -0500 Subject: [PATCH] Do not clone empty BlueZGnome repo --- src/com/gitblit/GitBlit.java | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/com/gitblit/GitBlit.java b/src/com/gitblit/GitBlit.java index 9c1cd40..e6f07e0 100644 --- a/src/com/gitblit/GitBlit.java +++ b/src/com/gitblit/GitBlit.java @@ -780,7 +780,7 @@ RepositoryModel model = new RepositoryModel(); model.name = repositoryName; model.hasCommits = JGitUtils.hasCommits(r); - model.lastChange = JGitUtils.getLastChange(r, null); + model.lastChange = JGitUtils.getLastChange(r); model.isBare = r.isBare(); StoredConfig config = JGitUtils.readConfig(r); if (config != null) { @@ -882,7 +882,7 @@ if (repositoryMetricsCache.hasCurrent(model.name, model.lastChange)) { return new ArrayList<Metric>(repositoryMetricsCache.getObject(model.name)); } - List<Metric> metrics = MetricUtils.getDateMetrics(repository, null, true, null); + List<Metric> metrics = MetricUtils.getDateMetrics(repository, null, true, null, getTimezone()); repositoryMetricsCache.updateObject(model.name, model.lastChange, metrics); return new ArrayList<Metric>(metrics); } @@ -1838,14 +1838,18 @@ WebXmlSettings webxmlSettings = new WebXmlSettings(context); // 0.7.0 web.properties in the deployed war folder - File overrideFile = new File(context.getRealPath("/WEB-INF/web.properties")); - if (overrideFile.exists()) { - webxmlSettings.applyOverrides(overrideFile); + String webProps = context.getRealPath("/WEB-INF/web.properties"); + if (!StringUtils.isEmpty(webProps)) { + File overrideFile = new File(webProps); + if (overrideFile.exists()) { + webxmlSettings.applyOverrides(overrideFile); + } } + // 0.8.0 gitblit.properties file located outside the deployed war // folder lie, for example, on RedHat OpenShift. - overrideFile = getFileOrFolder("gitblit.properties"); + File overrideFile = getFileOrFolder("gitblit.properties"); if (!overrideFile.getPath().equals("gitblit.properties")) { webxmlSettings.applyOverrides(overrideFile); } -- Gitblit v1.9.1