summaryrefslogtreecommitdiffstats
path: root/models/pull_sign.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2021-08-09 20:08:51 +0200
committerGitHub <noreply@github.com>2021-08-09 14:08:51 -0400
commitd9ef43a7126ab83af563c1c9b54cdf0092327b2a (patch)
treefabc9a9d24d42bb0de6dd9557c9e07e95bd5722b /models/pull_sign.go
parent23d438f56524a7c3fc185df66d6d95f797a80eee (diff)
downloadgitea-d9ef43a7126ab83af563c1c9b54cdf0092327b2a.tar.gz
gitea-d9ef43a7126ab83af563c1c9b54cdf0092327b2a.zip
Replace `list.List` with slices (#16311)
* Replaced list with slice. * Fixed usage of pointer to temporary variable. * Replaced LIFO list with slice. * Lint * Removed type check. * Removed duplicated code. * Lint * Fixed merge. Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'models/pull_sign.go')
-rw-r--r--models/pull_sign.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/models/pull_sign.go b/models/pull_sign.go
index 10a6522ebe..e7cf4ab666 100644
--- a/models/pull_sign.go
+++ b/models/pull_sign.go
@@ -118,8 +118,7 @@ Loop:
if err != nil {
return false, "", nil, err
}
- for e := commitList.Front(); e != nil; e = e.Next() {
- commit = e.Value.(*git.Commit)
+ for _, commit := range commitList {
verification := ParseCommitWithSignature(commit)
if !verification.Verified {
return false, "", nil, &ErrWontSign{commitsSigned}