summaryrefslogtreecommitdiffstats
path: root/modules/git/repo_blame.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/repo_blame.go')
-rw-r--r--modules/git/repo_blame.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/git/repo_blame.go b/modules/git/repo_blame.go
index 7f44735f9f..e25efa2d3b 100644
--- a/modules/git/repo_blame.go
+++ b/modules/git/repo_blame.go
@@ -3,7 +3,9 @@
package git
-import "fmt"
+import (
+ "fmt"
+)
// FileBlame return the Blame object of file
func (repo *Repository) FileBlame(revision, path, file string) ([]byte, error) {
@@ -14,8 +16,8 @@ func (repo *Repository) FileBlame(revision, path, file string) ([]byte, error) {
// 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").
- AddArguments(CmdArg(fmt.Sprintf("-L %d,%d", line, line))).
- AddArguments("-p").AddDynamicArguments(revision).
+ AddOptionFormat("-L %d,%d", line, line).
+ AddOptionValues("-p", revision).
AddDashesAndList(file).RunStdString(&RunOpts{Dir: path})
if err != nil {
return nil, err