Skip to content

Commit e700b28

Browse files
committed
refactor: rename BlameFile to Blame to match git command
1 parent 2c22bbe commit e700b28

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

repo_blame.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ type BlameOptions struct {
2121
CommandOptions
2222
}
2323

24-
// BlameFile returns blame results of the file with the given revision of the
24+
// Blame returns blame results of the file with the given revision of the
2525
// repository.
26-
func (r *Repository) BlameFile(rev, file string, opts ...BlameOptions) (*Blame, error) {
26+
func (r *Repository) Blame(rev, file string, opts ...BlameOptions) (*Blame, error) {
2727
var opt BlameOptions
2828
if len(opts) > 0 {
2929
opt = opts[0]

repo_blame_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import (
1111
"github.com/stretchr/testify/assert"
1212
)
1313

14-
func TestRepository_BlameFile(t *testing.T) {
14+
func TestRepository_Blame(t *testing.T) {
1515
t.Run("bad file", func(t *testing.T) {
16-
_, err := testrepo.BlameFile("", "404.txt")
16+
_, err := testrepo.Blame("", "404.txt")
1717
assert.Error(t, err)
1818
})
1919

20-
blame, err := testrepo.BlameFile("cfc3b2993f74726356887a5ec093de50486dc617", "README.txt")
20+
blame, err := testrepo.Blame("cfc3b2993f74726356887a5ec093de50486dc617", "README.txt")
2121
assert.Nil(t, err)
2222

2323
// Assert representative commits

0 commit comments

Comments
 (0)