Merge "Fix: Projects created outside of Gerrit could not be cloned."
This commit is contained in:
@@ -136,8 +136,16 @@ public class LocalDiskRepositoryManager implements GitRepositoryManager {
|
|||||||
throw new RepositoryNotFoundException("Invalid name: " + name);
|
throw new RepositoryNotFoundException("Invalid name: " + name);
|
||||||
}
|
}
|
||||||
if (!names.contains(name)) {
|
if (!names.contains(name)) {
|
||||||
|
// The this.names list does not hold the project-name but it can still exist
|
||||||
|
// on disk; for instance when the project has been created directly on the
|
||||||
|
// file-system through replication.
|
||||||
|
//
|
||||||
|
if (FileKey.resolve(gitDirOf(name), FS.DETECTED) != null) {
|
||||||
|
onCreateProject(name);
|
||||||
|
} else {
|
||||||
throw new RepositoryNotFoundException(gitDirOf(name));
|
throw new RepositoryNotFoundException(gitDirOf(name));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
final FileKey loc = FileKey.lenient(gitDirOf(name), FS.DETECTED);
|
final FileKey loc = FileKey.lenient(gitDirOf(name), FS.DETECTED);
|
||||||
try {
|
try {
|
||||||
return RepositoryCache.open(loc);
|
return RepositoryCache.open(loc);
|
||||||
|
|||||||
Reference in New Issue
Block a user