diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-08-31 17:44:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-31 10:44:14 +0100 |
commit | af1fd56d8a41777e68eaf1329188da57b498490c (patch) | |
tree | f2fc44c519c20832a0c450d7b55f23b023f0e7ff /services | |
parent | 0274933c22ac71f5289c0e227158f4a7feecc4f7 (diff) | |
download | gitea-af1fd56d8a41777e68eaf1329188da57b498490c.tar.gz gitea-af1fd56d8a41777e68eaf1329188da57b498490c.zip |
Fix dump and restore respository (#16698) (#16898)
* Fix dump and restore
* return different error message for get commit
* Fix missing delete release attachment when deleting repository
* Fix ci and add some comments
back port #16698
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'services')
-rw-r--r-- | services/pull/check.go | 2 | ||||
-rw-r--r-- | services/release/release.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/services/pull/check.go b/services/pull/check.go index 9db1654cfb..1e757ef28b 100644 --- a/services/pull/check.go +++ b/services/pull/check.go @@ -126,7 +126,7 @@ func getMergeCommit(pr *models.PullRequest) (*git.Commit, error) { commit, err := gitRepo.GetCommit(mergeCommit[:40]) if err != nil { - return nil, fmt.Errorf("GetCommit: %v", err) + return nil, fmt.Errorf("GetMergeCommit[%v]: %v", mergeCommit[:40], err) } return commit, nil diff --git a/services/release/release.go b/services/release/release.go index 6f5aa02c85..4a55f73a3a 100644 --- a/services/release/release.go +++ b/services/release/release.go @@ -44,7 +44,7 @@ func createTag(gitRepo *git.Repository, rel *models.Release, msg string) (bool, commit, err := gitRepo.GetCommit(rel.Target) if err != nil { - return false, fmt.Errorf("GetCommit: %v", err) + return false, fmt.Errorf("createTag::GetCommit[%v]: %v", rel.Target, err) } // Trim '--' prefix to prevent command line argument vulnerability. |