From dc6020645b357b301d0cc2f9386850825720b30b Mon Sep 17 00:00:00 2001 From: Giteabot Date: Thu, 21 Sep 2023 06:58:13 +0800 Subject: [PATCH] Fix successful return value for `SyncAndGetUserSpecificDiff` (#27152) (#27156) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #27152 by @delvh A function should not return an error when it is successful. Otherwise, things like https://discord.com/channels/322538954119184384/322538954119184384/1153705341620600833 happen… Co-authored-by: delvh (cherry picked from commit 25233a9bdcfd8d74c803be7712bdaed72eb41455) --- services/gitdiff/gitdiff.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/gitdiff/gitdiff.go b/services/gitdiff/gitdiff.go index 68f0e7a7ed..6f960ea87a 100644 --- a/services/gitdiff/gitdiff.go +++ b/services/gitdiff/gitdiff.go @@ -1312,7 +1312,7 @@ outer: } } - return diff, err + return diff, nil } // CommentAsDiff returns c.Patch as *Diff