|
|
@ -57,6 +57,7 @@ import java.util.Map; |
|
|
|
import java.util.concurrent.ConcurrentHashMap; |
|
|
|
import java.util.concurrent.ConcurrentHashMap; |
|
|
|
import java.util.concurrent.CopyOnWriteArrayList; |
|
|
|
import java.util.concurrent.CopyOnWriteArrayList; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.eclipse.jgit.lib.Constants; |
|
|
|
import org.eclipse.jgit.lib.PersonIdent; |
|
|
|
import org.eclipse.jgit.lib.PersonIdent; |
|
|
|
import org.eclipse.jgit.lib.Repository; |
|
|
|
import org.eclipse.jgit.lib.Repository; |
|
|
|
import org.eclipse.jgit.lib.RepositoryCache; |
|
|
|
import org.eclipse.jgit.lib.RepositoryCache; |
|
|
@ -204,8 +205,8 @@ public class Daemon { |
|
|
|
* the repository instance. |
|
|
|
* the repository instance. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void exportRepository(String name, final Repository db) { |
|
|
|
public void exportRepository(String name, final Repository db) { |
|
|
|
if (!name.endsWith(".git")) |
|
|
|
if (!name.endsWith(Constants.DOT_GIT_EXT)) |
|
|
|
name = name + ".git"; |
|
|
|
name = name + Constants.DOT_GIT_EXT; |
|
|
|
exports.put(name, db); |
|
|
|
exports.put(name, db); |
|
|
|
RepositoryCache.register(db); |
|
|
|
RepositoryCache.register(db); |
|
|
|
} |
|
|
|
} |
|
|
@ -358,7 +359,8 @@ public class Daemon { |
|
|
|
name = name.substring(1); |
|
|
|
name = name.substring(1); |
|
|
|
|
|
|
|
|
|
|
|
Repository db; |
|
|
|
Repository db; |
|
|
|
db = exports.get(name.endsWith(".git") ? name : name + ".git"); |
|
|
|
db = exports.get(name.endsWith(Constants.DOT_GIT_EXT) ? name : name |
|
|
|
|
|
|
|
+ Constants.DOT_GIT_EXT); |
|
|
|
if (db != null) { |
|
|
|
if (db != null) { |
|
|
|
db.incrementOpen(); |
|
|
|
db.incrementOpen(); |
|
|
|
return db; |
|
|
|
return db; |
|
|
|