summaryrefslogtreecommitdiffstats
path: root/modules/repofiles
diff options
context:
space:
mode:
authorRichard Mahn <richmahn@users.noreply.github.com>2019-06-29 11:19:24 -0400
committerzeripath <art27@cantab.net>2019-06-29 16:19:24 +0100
commit002b597c1f87cd5c69d32053a62f57c08d48d3ee (patch)
treec14ccd9f1a1b02e21759a4fcae569d8c8116df4f /modules/repofiles
parent462284e2f5768cf04d71c7abd8c01eef20cff73d (diff)
downloadgitea-002b597c1f87cd5c69d32053a62f57c08d48d3ee.tar.gz
gitea-002b597c1f87cd5c69d32053a62f57c08d48d3ee.zip
Fixes #7152 - Allow create/update/delete message to be empty, use default message (#7324)
* Fixes #7152 - Allow create/update/delete message to be empty, use default message * Linting fix * Fix to delete integration tests
Diffstat (limited to 'modules/repofiles')
-rw-r--r--modules/repofiles/delete.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/repofiles/delete.go b/modules/repofiles/delete.go
index 91910fa860..3d9b06b1c1 100644
--- a/modules/repofiles/delete.go
+++ b/modules/repofiles/delete.go
@@ -198,6 +198,11 @@ func DeleteRepoFile(repo *models.Repository, doer *models.User, opts *DeleteRepo
return nil, fmt.Errorf("PushUpdate: %v", err)
}
+ commit, err = t.GetCommit(commitHash)
+ if err != nil {
+ return nil, err
+ }
+
file, err := GetFileResponseFromCommit(repo, commit, opts.NewBranch, treePath)
if err != nil {
return nil, err