diff options
Diffstat (limited to 'services/agit')
-rw-r--r-- | services/agit/agit.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/agit/agit.go b/services/agit/agit.go index b2859c8a5b..5f8d16172d 100644 --- a/services/agit/agit.go +++ b/services/agit/agit.go @@ -205,7 +205,7 @@ func ProcRecive(ctx *context.PrivateContext, opts *private.HookOptions) []privat } if !forcePush { - output, err := git.NewCommand(ctx, "rev-list", "--max-count=1", oldCommitID, "^"+opts.NewCommitIDs[i]).RunInDirWithEnv(repo.RepoPath(), os.Environ()) + output, _, err := git.NewCommand(ctx, "rev-list", "--max-count=1", oldCommitID, "^"+opts.NewCommitIDs[i]).RunStdString(&git.RunOpts{Dir: repo.RepoPath(), Env: os.Environ()}) if err != nil { log.Error("Unable to detect force push between: %s and %s in %-v Error: %v", oldCommitID, opts.NewCommitIDs[i], repo, err) ctx.JSON(http.StatusInternalServerError, private.Response{ |