Merge "Prevent "test.git.git" turning into "test.git" in the Changes table."
This commit is contained in:
@@ -164,11 +164,24 @@ public class LocalDiskRepositoryManager implements GitRepositoryManager {
|
|||||||
// on disk; for instance when the project has been created directly on the
|
// on disk; for instance when the project has been created directly on the
|
||||||
// file-system through replication.
|
// file-system through replication.
|
||||||
//
|
//
|
||||||
|
if (!name.get().endsWith(Constants.DOT_GIT_EXT)) {
|
||||||
if (FileKey.resolve(gitDirOf(name), FS.DETECTED) != null) {
|
if (FileKey.resolve(gitDirOf(name), FS.DETECTED) != null) {
|
||||||
onCreateProject(name);
|
onCreateProject(name);
|
||||||
} else {
|
} else {
|
||||||
throw new RepositoryNotFoundException(gitDirOf(name));
|
throw new RepositoryNotFoundException(gitDirOf(name));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
final File directory = gitDirOf(name);
|
||||||
|
if (FileKey.isGitRepository(new File(directory, Constants.DOT_GIT),
|
||||||
|
FS.DETECTED)) {
|
||||||
|
onCreateProject(name);
|
||||||
|
} else if (FileKey.isGitRepository(new File(directory.getParentFile(),
|
||||||
|
directory.getName() + Constants.DOT_GIT_EXT), FS.DETECTED)) {
|
||||||
|
onCreateProject(name);
|
||||||
|
} else {
|
||||||
|
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 {
|
||||||
|
Reference in New Issue
Block a user