Skip to content

Commit

Permalink
Remove git.FileBlame (#25841)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
wolfogre and GiteaBot committed Jul 12, 2023
1 parent 8b89563 commit aee14b9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions modules/git/repo_blame.go
Original file line number Diff line number Diff line change
Expand Up @@ -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").
Expand Down

0 comments on commit aee14b9

Please sign in to comment.