diff options
Diffstat (limited to 'models/update.go')
-rw-r--r-- | models/update.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/models/update.go b/models/update.go index 3eb0990d3d..411f7d5be1 100644 --- a/models/update.go +++ b/models/update.go @@ -7,7 +7,6 @@ package models import ( "container/list" "fmt" - "os/exec" "strings" "time" @@ -193,9 +192,8 @@ func pushUpdate(opts PushUpdateOptions) (repo *Repository, err error) { repoPath := RepoPath(opts.RepoUserName, opts.RepoName) - gitUpdate := exec.Command("git", "update-server-info") - gitUpdate.Dir = repoPath - if err = gitUpdate.Run(); err != nil { + _, err = git.NewCommand("update-server-info").RunInDir(repoPath) + if err != nil { return nil, fmt.Errorf("Failed to call 'git update-server-info': %v", err) } |