aboutsummaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-08-31 09:18:15 +0800
committerGitHub <noreply@github.com>2021-08-30 21:18:15 -0400
commit8d7704b5a2f7a0c7425a32bbc875fed15f515b4a (patch)
tree04dd5badfbe842e5d2c6b77720282ede5b828c8b /services
parentc0f5da3e1adfe40cafc57de63948ef1878bd75c9 (diff)
downloadgitea-8d7704b5a2f7a0c7425a32bbc875fed15f515b4a.tar.gz
gitea-8d7704b5a2f7a0c7425a32bbc875fed15f515b4a.zip
Fix dump and restore respository (#16698)
* 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 Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'services')
-rw-r--r--services/pull/check.go2
-rw-r--r--services/release/release.go2
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.