diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-06-27 02:15:26 +0800 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-06-26 14:15:26 -0400 |
commit | edc94c70413048107ea728ff330f32ca3de6df88 (patch) | |
tree | cf5bcc5ba8ee4b2e585dc14a6cf7440ce88bc073 /modules/git/command.go | |
parent | 161e12e157a48f9bcd2de50c187c77444aa2a9a8 (diff) | |
download | gitea-edc94c70413048107ea728ff330f32ca3de6df88.tar.gz gitea-edc94c70413048107ea728ff330f32ca3de6df88.zip |
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
Diffstat (limited to 'modules/git/command.go')
-rw-r--r-- | modules/git/command.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/git/command.go b/modules/git/command.go index d6221ce268..347dcfe39f 100644 --- a/modules/git/command.go +++ b/modules/git/command.go @@ -12,6 +12,8 @@ import ( "os/exec" "strings" "time" + + "code.gitea.io/gitea/modules/process" ) var ( @@ -84,6 +86,9 @@ func (c *Command) RunInDirTimeoutEnvFullPipeline(env []string, timeout time.Dura return err } + pid := process.GetManager().Add(fmt.Sprintf("%s %s %s [repo_path: %s]", GitExecutable, c.name, strings.Join(c.args, " "), dir), cmd) + defer process.GetManager().Remove(pid) + if err := cmd.Wait(); err != nil { return err } |