diff options
author | Jason Song <i@wolfogre.com> | 2023-07-12 19:07:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-12 19:07:29 +0200 |
commit | aee14b9c0b23a7c4e4f6793221246dd913d71aca (patch) | |
tree | e874d695b76182954ab9d95dd7887e3121c25f1e /modules/git/repo_blame.go | |
parent | Fix empty project displayed in issue sidebar (#25802) (diff) | |
download | forgejo-aee14b9c0b23a7c4e4f6793221246dd913d71aca.tar.xz forgejo-aee14b9c0b23a7c4e4f6793221246dd913d71aca.zip |
Remove `git.FileBlame` (#25841)
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>
Diffstat (limited to '')
-rw-r--r-- | modules/git/repo_blame.go | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/modules/git/repo_blame.go b/modules/git/repo_blame.go index e25efa2d3b..139cdd7be9 100644 --- a/modules/git/repo_blame.go +++ b/modules/git/repo_blame.go @@ -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"). |