diff options
Diffstat (limited to 'services/repository/files/patch.go')
-rw-r--r-- | services/repository/files/patch.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/repository/files/patch.go b/services/repository/files/patch.go index 437890c488..2be01f25be 100644 --- a/services/repository/files/patch.go +++ b/services/repository/files/patch.go @@ -125,7 +125,7 @@ func ApplyDiffPatch(ctx context.Context, repo *repo_model.Repository, doer *user } else { lastCommitID, err := t.gitRepo.ConvertToSHA1(opts.LastCommitID) if err != nil { - return nil, fmt.Errorf("ApplyPatch: Invalid last commit ID: %v", err) + return nil, fmt.Errorf("ApplyPatch: Invalid last commit ID: %w", err) } opts.LastCommitID = lastCommitID.String() if commit.ID.String() != opts.LastCommitID { @@ -152,7 +152,7 @@ func ApplyDiffPatch(ctx context.Context, repo *repo_model.Repository, doer *user Stderr: stderr, Stdin: strings.NewReader(opts.Content), }); err != nil { - return nil, fmt.Errorf("Error: Stdout: %s\nStderr: %s\nErr: %v", stdout.String(), stderr.String(), err) + return nil, fmt.Errorf("Error: Stdout: %s\nStderr: %s\nErr: %w", stdout.String(), stderr.String(), err) } // Now write the tree |