From 856c8a2ad521064d69b2b50003c1df382d375013 Mon Sep 17 00:00:00 2001
From: Marcin Floryan <marcin.floryan@gmail.com>
Date: Sat, 03 Nov 2012 15:15:22 -0400
Subject: [PATCH] Download progress - CR character behaves as expected on Windows but not on other platforms.
---
src/com/gitblit/DownloadZipServlet.java | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/com/gitblit/DownloadZipServlet.java b/src/com/gitblit/DownloadZipServlet.java
index 209272f..2655934 100644
--- a/src/com/gitblit/DownloadZipServlet.java
+++ b/src/com/gitblit/DownloadZipServlet.java
@@ -101,11 +101,16 @@
if (!StringUtils.isEmpty(objectId)) {
name += "-" + objectId;
}
-
+
Repository r = GitBlit.self().getRepository(repository);
if (r == null) {
- error(response, MessageFormat.format("# Error\nFailed to find repository {0}", repository));
- return;
+ if (GitBlit.self().isCollectingGarbage(repository)) {
+ error(response, MessageFormat.format("# Error\nGitblit is busy collecting garbage in {0}", repository));
+ return;
+ } else {
+ error(response, MessageFormat.format("# Error\nFailed to find repository {0}", repository));
+ return;
+ }
}
RevCommit commit = JGitUtils.getCommit(r, objectId);
if (commit == null) {
--
Gitblit v1.9.1