Fix tautological conditions (#30735)

As discovered by https://github.com/go-gitea/gitea/pull/30729.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 610802df85933e7a190a705bc3f7800da87ce868)

Conflicts:
	tests/integration/git_test.go
	trivial conflict because of https://codeberg.org/forgejo/forgejo/pulls/2834
This commit is contained in:
silverwind 2024-04-30 14:34:40 +02:00 committed by Earl Warren
parent 51b8d964c8
commit 9792a377e4
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
4 changed files with 20 additions and 23 deletions

View file

@ -182,7 +182,7 @@ func createProvider(providerName string, source *Source) (goth.Provider, error)
}
// always set the name if provider is created so we can support multiple setups of 1 provider
if err == nil && provider != nil {
if provider != nil {
provider.SetName(providerName)
}