We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1b09fcb + 08a7e65 commit 6d2fe0aCopy full SHA for 6d2fe0a
services/asymkey/sign.go
@@ -290,16 +290,22 @@ Loop:
290
return false, nil, nil, err
291
}
292
defer gitRepo.Close()
293
- commit, err := gitRepo.GetCommit(parentCommit)
+ isEmpty, err := gitRepo.IsEmpty()
294
if err != nil {
295
296
297
- if commit.Signature == nil {
298
- return false, nil, nil, &ErrWontSign{parentSigned}
299
- }
300
- verification := ParseCommitWithSignature(ctx, commit)
301
- if !verification.Verified {
302
+ if !isEmpty {
+ commit, err := gitRepo.GetCommit(parentCommit)
+ if err != nil {
+ return false, nil, nil, err
+ }
+ if commit.Signature == nil {
303
+ return false, nil, nil, &ErrWontSign{parentSigned}
304
305
+ verification := ParseCommitWithSignature(ctx, commit)
306
+ if !verification.Verified {
307
308
309
310
311
services/lfs/server.go
@@ -114,7 +114,7 @@ func DownloadHandler(ctx *context.Context) {
114
115
116
117
- ctx.Resp.Header().Set("Content-Range", fmt.Sprintf("bytes %d-%d/%d", fromByte, toByte, meta.Size-fromByte))
+ ctx.Resp.Header().Set("Content-Range", fmt.Sprintf("bytes %d-%d/%d", fromByte, toByte, meta.Size))
118
ctx.Resp.Header().Set("Access-Control-Expose-Headers", "Content-Range")
119
120
0 commit comments