Skip to content

Commit 2362ed1

Browse files
committed
Fix test
1 parent a7f02a0 commit 2362ed1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

services/repository/archiver/archiver.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ func ParseFileName(uri string) (ext string, tp git.ArchiveType, err error) {
8888
// resulting ArchiveRequest is suitable for being passed to Await()
8989
// if it's determined that the request still needs to be satisfied.
9090
func NewRequest(repoID int64, repo *git.Repository, refName string, fileType git.ArchiveType) (*ArchiveRequest, error) {
91+
if fileType < git.ZIP || fileType > git.BUNDLE {
92+
return nil, ErrUnknownArchiveFormat{RequestFormat: fileType.String()}
93+
}
94+
9195
r := &ArchiveRequest{
9296
RepoID: repoID,
9397
refName: refName,

0 commit comments

Comments
 (0)