From 176c7432bf1d28269f381045335bb2a130444686 Mon Sep 17 00:00:00 2001 From: Alexey Makhov Date: Mon, 6 Feb 2017 00:15:12 +0300 Subject: [PATCH] Adding git blame --- repo_blame.go | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 repo_blame.go diff --git a/repo_blame.go b/repo_blame.go new file mode 100644 index 0000000..b48cbee --- /dev/null +++ b/repo_blame.go @@ -0,0 +1,10 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package git + +// FileBlame return the Blame object of file +func (repo *Repository) FileBlame(revision, path, file string) ([]byte, error) { + return NewCommand("blame", "--root", file).RunInDirBytes(path) +}