diff --git a/act/common/git/git.go b/act/common/git/git.go index 1748e797..bffe4feb 100644 --- a/act/common/git/git.go +++ b/act/common/git/git.go @@ -340,7 +340,7 @@ func NewGitCloneExecutor(input NewGitCloneExecutorInput) common.Executor { logger.Errorf("Unable to resolve %s: %v", input.Ref, err) } - if hash.String() != input.Ref && strings.HasPrefix(hash.String(), input.Ref) { + if hash.String() != input.Ref && len(input.Ref) >= 4 && strings.HasPrefix(hash.String(), input.Ref) { return &Error{ err: ErrShortRef, commit: hash.String(),