git: fixed wrong regex on sha search

This commit is contained in:
RhodeCode Admin 2023-03-07 09:58:00 +01:00
parent 51da82dce0
commit a31c7f35e5

View file

@ -45,7 +45,7 @@ from rhodecode.lib.vcs.exceptions import (
RepositoryError, TagAlreadyExistError, TagDoesNotExistError, VCSError, UnresolvedFilesInRepo)
SHA_PATTERN = re.compile(r'^[[0-9a-fA-F]{12}|[0-9a-fA-F]{40}]$')
SHA_PATTERN = re.compile(r'^([0-9a-fA-F]{12}|[0-9a-fA-F]{40})$')
log = logging.getLogger(__name__)