]> source.dussan.org Git - gitea.git/commitdiff
Fix successful return value for `SyncAndGetUserSpecificDiff` (#27152) v1.21.0-rc0
authordelvh <dev.lh@web.de>
Wed, 20 Sep 2023 20:28:17 +0000 (22:28 +0200)
committerGitHub <noreply@github.com>
Wed, 20 Sep 2023 20:28:17 +0000 (22:28 +0200)
A function should not return an error when it is successful.
Otherwise, things like https://discord.com/channels/322538954119184384/322538954119184384/1153705341620600833 happen…

services/gitdiff/gitdiff.go

index 4cc093e65debd2575ce5b0d96dbb1b1675799aaf..fd0f32717c4b6709a7636a8972c0f42aa7d71cfc 100644 (file)
@@ -1343,7 +1343,7 @@ outer:
                }
        }
 
-       return diff, err
+       return diff, nil
 }
 
 // CommentAsDiff returns c.Patch as *Diff