mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Don't read the hash if the file doesn't look like a branch
Follow-up to 0668f25
This commit is contained in:
@@ -272,9 +272,12 @@ class GitRepositoryReader {
|
||||
String relativePath = FileUtil.getRelativePath(refsRootDir, file);
|
||||
if (relativePath != null) {
|
||||
String branchName = prefix + FileUtil.toSystemIndependentName(relativePath);
|
||||
String hash = loadHashFromBranchFile(file);
|
||||
if (hash != null && GitRefNameValidator.getInstance().checkInput(branchName)) {
|
||||
result.put(branchName, hash);
|
||||
boolean isBranchNameValid = GitRefNameValidator.getInstance().checkInput(branchName);
|
||||
if (isBranchNameValid) {
|
||||
String hash = loadHashFromBranchFile(file);
|
||||
if (hash != null) {
|
||||
result.put(branchName, hash);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user