[PR #5121] [MERGED] Remove duplicated if bodies #17653

Closed
opened 2025-11-02 14:46:05 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/5121
Author: @cristaloleg
Created: 10/19/2018
Status: Merged
Merged: 10/19/2018
Merged by: @techknowlogick

Base: masterHead: gocritic-dupBranchBody


📝 Commits (2)

  • 078b25b Remove duplicated if bodies
  • a99200a Merge branch 'master' into gocritic-dupBranchBody

📊 Changes

1 file changed (+5 additions, -12 deletions)

View changed files

📝 models/user.go (+5 -12)

📄 Description

Found by go-critic dupBranchBody checker.

Possibly a bug? Maybe we should use different queries for different databases?

Log

models/user.go:381:2 dupBranchBody both branches in if statement has same body
models/user.go:400:2 dupBranchBody both branches in if statement has same body

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/5121 **Author:** [@cristaloleg](https://github.com/cristaloleg) **Created:** 10/19/2018 **Status:** ✅ Merged **Merged:** 10/19/2018 **Merged by:** [@techknowlogick](https://github.com/techknowlogick) **Base:** `master` ← **Head:** `gocritic-dupBranchBody` --- ### 📝 Commits (2) - [`078b25b`](https://github.com/go-gitea/gitea/commit/078b25b29e4c937e9c3ac8b6306f5f95b2208a3d) Remove duplicated if bodies - [`a99200a`](https://github.com/go-gitea/gitea/commit/a99200a8f6aa7bf407b1560e145f56f7728c720c) Merge branch 'master' into gocritic-dupBranchBody ### 📊 Changes **1 file changed** (+5 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `models/user.go` (+5 -12) </details> ### 📄 Description Found by go-critic `dupBranchBody` checker. Possibly a bug? Maybe we should use different queries for different databases? Log ``` models/user.go:381:2 dupBranchBody both branches in if statement has same body models/user.go:400:2 dupBranchBody both branches in if statement has same body ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 14:46:05 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17653