Skip to content

Commit 83891e0

Browse files
author
Thomas Sayen
committed
Fixed command creation
1 parent 8ad9004 commit 83891e0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/git/commit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ type CommitsCountOptions struct {
173173

174174
// CommitsCount returns number of total commits of until given revision.
175175
func CommitsCount(ctx context.Context, opts CommitsCountOptions) (int64, error) {
176-
cmd := NewCommand(ctx, "--no-pager", "log", "--pretty=format:%H")
176+
cmd := NewCommand("--no-pager", "log", "--pretty=format:%H")
177177

178178
cmd.AddDynamicArguments(opts.Revision...)
179179

modules/git/repo_commit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ func (repo *Repository) CommitsByFileAndRange(opts CommitsByFileAndRangeOptions)
239239
}()
240240
go func() {
241241
stderr := strings.Builder{}
242-
gitCmd := NewCommand(repo.Ctx, "--no-pager", "log").
242+
gitCmd := NewCommand("--no-pager", "log").
243243
AddOptionFormat("--pretty=format:%%H").
244244
AddOptionFormat("--max-count=%d", setting.Git.CommitsRangeSize).
245245
AddOptionFormat("--skip=%d", (opts.Page-1)*setting.Git.CommitsRangeSize)

0 commit comments

Comments
 (0)