]> source.dussan.org Git - gitea.git/commitdiff
Remove `git.FileBlame` (#25841)
authorJason Song <i@wolfogre.com>
Wed, 12 Jul 2023 17:07:29 +0000 (01:07 +0800)
committerGitHub <noreply@github.com>
Wed, 12 Jul 2023 17:07:29 +0000 (19:07 +0200)
The `FileBlame` function looks strange, it has `revision` as argument
but doesn't use it.

Since the function never be used, I think we could just remove it.

If anyone thinks it should be kept, please help fix `revision`.

Co-authored-by: Giteabot <teabot@gitea.io>
modules/git/repo_blame.go

index e25efa2d3bfa5969b1487d15ec4947dca9e061e0..139cdd7be964a76890619439935baef9a4504b02 100644 (file)
@@ -7,12 +7,6 @@ import (
        "fmt"
 )
 
-// FileBlame return the Blame object of file
-func (repo *Repository) FileBlame(revision, path, file string) ([]byte, error) {
-       stdout, _, err := NewCommand(repo.Ctx, "blame", "--root").AddDashesAndList(file).RunStdBytes(&RunOpts{Dir: path})
-       return stdout, err
-}
-
 // LineBlame returns the latest commit at the given line
 func (repo *Repository) LineBlame(revision, path, file string, line uint) (*Commit, error) {
        res, _, err := NewCommand(repo.Ctx, "blame").