diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-09-06 10:20:09 +0800 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-09-05 22:20:09 -0400 |
commit | c03d75fbd51174d0e7ffdbaf9e9e253438d06cf7 (patch) | |
tree | a54e9fdfb6ff96baf7010d7fd5049a05a16644e2 /modules/repofiles/diff.go | |
parent | b660a732ae283d863636ead9cc1a365ce1c0edc1 (diff) | |
download | gitea-c03d75fbd51174d0e7ffdbaf9e9e253438d06cf7.tar.gz gitea-c03d75fbd51174d0e7ffdbaf9e9e253438d06cf7.zip |
Move git diff codes from models to services/gitdiff (#7889)
* move git diff codes from models to services/gitdiff
* fix template
* fix test
* fix template
Diffstat (limited to 'modules/repofiles/diff.go')
-rw-r--r-- | modules/repofiles/diff.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/repofiles/diff.go b/modules/repofiles/diff.go index 3b5de5fa6f..c98bbc7684 100644 --- a/modules/repofiles/diff.go +++ b/modules/repofiles/diff.go @@ -8,10 +8,11 @@ import ( "strings" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/services/gitdiff" ) // GetDiffPreview produces and returns diff result of a file which is not yet committed. -func GetDiffPreview(repo *models.Repository, branch, treePath, content string) (*models.Diff, error) { +func GetDiffPreview(repo *models.Repository, branch, treePath, content string) (*gitdiff.Diff, error) { if branch == "" { branch = repo.DefaultBranch } |