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
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
diff.go
diff_test.go Calculate filename hash only once (#19654) 2022-05-09 00:29:50 +02:00
file.go
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
tree_test.go
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