From 256173fc2580bea7c96b225f567d7dfa03d96652 Mon Sep 17 00:00:00 2001 From: DmitryFrolovTri <23313323+DmitryFrolovTri@users.noreply.github.com> Date: Tue, 23 May 2023 06:42:42 +0000 Subject: [PATCH] Fixed lint errors in hook_pre_recieve.go --- routers/private/hook_pre_receive.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/routers/private/hook_pre_receive.go b/routers/private/hook_pre_receive.go index aaa8d275fc3..e9fbbc75d34 100644 --- a/routers/private/hook_pre_receive.go +++ b/routers/private/hook_pre_receive.go @@ -110,15 +110,15 @@ func CalculateSizeOfObject(ctx *gitea_context.PrivateContext, opts *git.RunOpts, objectSizeStr, _, err := git.NewCommand(ctx, "cat-file", "-s").AddDynamicArguments(objectID).RunStdString(opts) if err != nil { log.Trace("CalculateSizeOfRemovedObjects: Error during git cat-file -s on object: %s", objectID) - return + return objectSize } objectSize, _ = strconv.ParseInt(strings.TrimSpace(objectSizeStr), 10, 64) if err != nil { log.Trace("CalculateSizeOfRemovedObjects: Error during ParseInt on string '%s'", objectID) - return + return objectSize } - return + return objectSize } // CalculateSizeOfObjects calculates the size of objects added and removed from the repository by new commit @@ -148,7 +148,7 @@ func CalculateSizeOfObjects(ctx *gitea_context.PrivateContext, opts *git.RunOpts } } } - return + return addedSize, removedSize } // ConvertObjectsToMap takes a newline-separated string of git objects and