Monitor all git commands; move blame to git package and replace git as a variable (#6864)

* monitor all git commands; move blame to git package and replace git as a variable

* use git command but not other commands

* fix build

* move exec.Command to git.NewCommand

* fix fmt

* remove unrelated changes

* remove unrelated changes

* refactor IsEmpty and add tests

* fix tests

* fix tests

* fix tests

* fix tests

* remove gitLogger

* fix fmt

* fix isEmpty

* fix lint

* fix tests
This commit is contained in:
Lunny Xiao 2019-06-27 02:15:26 +08:00 committed by techknowlogick
parent 161e12e157
commit edc94c7041
34 changed files with 750 additions and 74 deletions

View file

@ -20,10 +20,13 @@ import (
"strconv"
"time"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/markup"
"code.gitea.io/gitea/modules/markup/external"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/routers"
"code.gitea.io/gitea/routers/routes"
"github.com/Unknwon/com"
"github.com/go-xorm/xorm"
context2 "github.com/gorilla/context"
@ -31,9 +34,6 @@ import (
"gopkg.in/src-d/go-git.v4/config"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/testfixtures.v2"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/setting"
)
var codeFilePath = "contrib/pr/checkout.go"