diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-02-23 11:40:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-23 11:40:44 +0800 |
commit | 0e6b9ea786a77a4df4aa9fff1b96b9483bcdded5 (patch) | |
tree | 83ce2a577016f3a6fd478cce8e384f9b3118f3f6 /vendor/code.gitea.io/git/repo_blame.go | |
parent | 4f3880ff151fcbda019a1a9467bc39da621fbe07 (diff) | |
download | gitea-0e6b9ea786a77a4df4aa9fff1b96b9483bcdded5.tar.gz gitea-0e6b9ea786a77a4df4aa9fff1b96b9483bcdded5.zip |
Take back control of hooks (#1006)
* git: delegate all server-side Git hooks (#1623)
* create hooks directories
* take control hooks back
* fix lint
* bug fixed and minor changes
* fix imports style
* fix migration scripts
Diffstat (limited to 'vendor/code.gitea.io/git/repo_blame.go')
-rw-r--r-- | vendor/code.gitea.io/git/repo_blame.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/code.gitea.io/git/repo_blame.go b/vendor/code.gitea.io/git/repo_blame.go new file mode 100644 index 0000000000..b48cbeea6c --- /dev/null +++ b/vendor/code.gitea.io/git/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) +} |