Skip to content

Commit 89455ae

Browse files
authored
Merge branch 'main' into patch-mail-templates-1
2 parents 5e1bd5f + 6619b1e commit 89455ae

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

options/locale/locale_zh-CN.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,7 @@ issues.role.member_helper=该用户是拥有此仓库的组织的成员。
16491649
issues.role.collaborator=协作者
16501650
issues.role.collaborator_helper=该用户已被邀请在仓库上进行协作。
16511651
issues.role.first_time_contributor=首次贡献者
1652-
issues.role.first_time_contributor_helper=这是该用户对仓库的第一次贡献
1652+
issues.role.first_time_contributor_helper=这是该用户对此仓库的第一次贡献
16531653
issues.role.contributor=贡献者
16541654
issues.role.contributor_helper=该用户之前提交过该仓库。
16551655
issues.re_request_review=再次请求审核
@@ -1905,7 +1905,7 @@ pulls.required_status_check_failed=一些必要的检查没有成功
19051905
pulls.required_status_check_missing=缺少一些必要的检查。
19061906
pulls.required_status_check_administrator=作为管理员,您仍可合并此合并请求
19071907
pulls.blocked_by_approvals=此合并请求还没有足够的批准。已获批准数 %d 个,需获批准数 %d 个。
1908-
pulls.blocked_by_approvals_whitelisted=此合并请求还没有足够的批准。%[2]d 中的 %[1]d 个已由允许名单中的用户或团队批准
1908+
pulls.blocked_by_approvals_whitelisted=此合并请求尚未获得足够的批准。已获得 %d/%d 个来自允许列表中用户或团队的批准
19091909
pulls.blocked_by_rejection=此合并请求有官方审核员请求的更改。
19101910
pulls.blocked_by_official_review_requests=此合并请求需要官方评审。
19111911
pulls.blocked_by_outdated_branch=此合并请求因过期而被阻止。
@@ -2828,7 +2828,7 @@ team_desc_helper=描述团队的目的或作用。
28282828
team_access_desc=仓库权限
28292829
team_permission_desc=权限
28302830
team_unit_desc=允许访问仓库单元
2831-
team_unit_disabled=(已禁用)
2831+
team_unit_disabled=已禁用
28322832

28332833
form.name_been_taken=组织名称「%s」已经被占用。
28342834
form.name_reserved=组织名称「%s」是保留的。
@@ -3562,7 +3562,7 @@ raw_seconds=秒
35623562
raw_minutes=分钟
35633563

35643564
[dropzone]
3565-
default_message=拖动文件或者点击此处上传
3565+
default_message=拖曳文件或点击此处上传
35663566
invalid_input_type=您不能上传该类型的文件
35673567
file_too_big=文件体积({{filesize}} MB)超过了最大允许体积({{maxFilesize}} MB)
35683568
remove_file=移除文件

services/asymkey/sign.go

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -290,16 +290,22 @@ Loop:
290290
return false, nil, nil, err
291291
}
292292
defer gitRepo.Close()
293-
commit, err := gitRepo.GetCommit(parentCommit)
293+
isEmpty, err := gitRepo.IsEmpty()
294294
if err != nil {
295295
return false, nil, nil, err
296296
}
297-
if commit.Signature == nil {
298-
return false, nil, nil, &ErrWontSign{parentSigned}
299-
}
300-
verification := ParseCommitWithSignature(ctx, commit)
301-
if !verification.Verified {
302-
return false, nil, nil, &ErrWontSign{parentSigned}
297+
if !isEmpty {
298+
commit, err := gitRepo.GetCommit(parentCommit)
299+
if err != nil {
300+
return false, nil, nil, err
301+
}
302+
if commit.Signature == nil {
303+
return false, nil, nil, &ErrWontSign{parentSigned}
304+
}
305+
verification := ParseCommitWithSignature(ctx, commit)
306+
if !verification.Verified {
307+
return false, nil, nil, &ErrWontSign{parentSigned}
308+
}
303309
}
304310
}
305311
}

services/lfs/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func DownloadHandler(ctx *context.Context) {
114114
}
115115
}
116116

117-
ctx.Resp.Header().Set("Content-Range", fmt.Sprintf("bytes %d-%d/%d", fromByte, toByte, meta.Size-fromByte))
117+
ctx.Resp.Header().Set("Content-Range", fmt.Sprintf("bytes %d-%d/%d", fromByte, toByte, meta.Size))
118118
ctx.Resp.Header().Set("Access-Control-Expose-Headers", "Content-Range")
119119
}
120120
}

0 commit comments

Comments
 (0)