From 59b5fa4e22a473e6814e1dd0af273883ccafe4f2 Mon Sep 17 00:00:00 2001
From: Stardrad Yin <yin8086@gmail.com>
Date: Sat, 08 Mar 2014 01:46:57 -0500
Subject: [PATCH] add Chinese strings
---
src/main/java/com/gitblit/git/GitblitReceivePackFactory.java | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/gitblit/git/GitblitReceivePackFactory.java b/src/main/java/com/gitblit/git/GitblitReceivePackFactory.java
index b8b49bc..7976fe5 100644
--- a/src/main/java/com/gitblit/git/GitblitReceivePackFactory.java
+++ b/src/main/java/com/gitblit/git/GitblitReceivePackFactory.java
@@ -100,10 +100,17 @@
if (StringUtils.isEmpty(url)) {
url = gitblitUrl;
}
-
+
final RepositoryModel repository = gitblit.getRepositoryModel(repositoryName);
- final GitblitReceivePack rp = new GitblitReceivePack(gitblit, db, repository, user);
+ // Determine which receive pack to use for pushes
+ final GitblitReceivePack rp;
+ if (gitblit.getTicketService().isAcceptingNewPatchsets(repository)) {
+ rp = new PatchsetReceivePack(gitblit, db, repository, user);
+ } else {
+ rp = new GitblitReceivePack(gitblit, db, repository, user);
+ }
+
rp.setGitblitUrl(url);
rp.setRefLogIdent(new PersonIdent(user.username, user.username + "@" + origin));
rp.setTimeout(timeout);
--
Gitblit v1.9.1