aboutsummaryrefslogtreecommitdiffstats
path: root/services/agit
diff options
context:
space:
mode:
Diffstat (limited to 'services/agit')
-rw-r--r--services/agit/agit.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/agit/agit.go b/services/agit/agit.go
index 9f0ce75123..cea2b1f580 100644
--- a/services/agit/agit.go
+++ b/services/agit/agit.go
@@ -179,7 +179,7 @@ func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git.
}
if !forcePush {
- output, _, err := git.NewCommand(ctx, "rev-list", "--max-count=1", oldCommitID, "^"+opts.NewCommitIDs[i]).RunStdString(&git.RunOpts{Dir: repo.RepoPath(), Env: os.Environ()})
+ output, _, err := git.NewCommand(ctx, "rev-list", "--max-count=1").AddDynamicArguments(oldCommitID, "^"+opts.NewCommitIDs[i]).RunStdString(&git.RunOpts{Dir: repo.RepoPath(), Env: os.Environ()})
if err != nil {
return nil, fmt.Errorf("Fail to detect force push: %v", err)
} else if len(output) > 0 {