Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-24 10:46:10 +01:00
forgejo/services/repository/files
Gusted 692707f145
Add latest commit's SHA to content response (#20398)
* Add latest commit's SHA to content response

- When requesting the contents of a filepath, add the latest commit's
SHA to the requested file.
- Resolves #12840

* Add swagger

* Fix NPE

* Fix tests

* Hook into LastCommitCache

* Move AddLastCommitCache to a common nogogit and gogit file

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Prevent NPE

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-07-30 16:09:04 +08:00
..
cherry_pick.go Allow API to create file on empty repo (#19224) 2022-03-28 21:48:41 +02:00
commit.go Move some code into models/git (#19879) 2022-06-12 23:51:54 +08:00
content.go Add latest commit's SHA to content response (#20398) 2022-07-30 16:09:04 +08:00
content_test.go Add latest commit's SHA to content response (#20398) 2022-07-30 16:09:04 +08:00
delete.go Allow API to create file on empty repo (#19224) 2022-03-28 21:48:41 +02:00
diff.go Propagate context and ensure git commands run in request context (#17868) 2022-01-19 23:26:57 +00:00
diff_test.go Calculate filename hash only once (#19654) 2022-05-09 00:29:50 +02:00
file.go Propagate context and ensure git commands run in request context (#17868) 2022-01-19 23:26:57 +00:00
file_test.go Add latest commit's SHA to content response (#20398) 2022-07-30 16:09:04 +08:00
patch.go Move some code into models/git (#19879) 2022-06-12 23:51:54 +08:00
temp_repo.go Remove legacy git code (ver < 2.0), fine tune markup tests (#19930) 2022-06-16 23:47:44 +08:00
tree.go Propagate context and ensure git commands run in request context (#17868) 2022-01-19 23:26:57 +00:00
tree_test.go Propagate context and ensure git commands run in request context (#17868) 2022-01-19 23:26:57 +00:00
update.go Move some code into models/git (#19879) 2022-06-12 23:51:54 +08:00
upload.go Move some code into models/git (#19879) 2022-06-12 23:51:54 +08:00