mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-07-09 13:00:02 +02:00
Allow API to create file on empty repo (#19224)
This PR adds the necessary work to make it possible to create files on empty repos using the API. Fix #10993 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
54961f3ac9
commit
e69b7a92ed
8 changed files with 175 additions and 117 deletions
|
@ -123,7 +123,7 @@ func UploadRepoFiles(ctx context.Context, repo *repo_model.Repository, doer *use
|
|||
committer := doer
|
||||
|
||||
// Now commit the tree
|
||||
commitHash, err := t.CommitTree(author, committer, treeHash, opts.Message, opts.Signoff)
|
||||
commitHash, err := t.CommitTree(opts.LastCommitID, author, committer, treeHash, opts.Message, opts.Signoff)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue