Skip to content

Commit b64968f

Browse files
author
Gusted
committed
Include diff
1 parent 980573f commit b64968f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/git/diff.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func GetRepoRawDiffForFile(repo *Repository, startCommit, endCommit string, diff
8181
}
8282

8383
stderr := new(bytes.Buffer)
84-
cmd := NewCommandContextNoGlobals(repo.Ctx, args...)
84+
cmd := NewCommandContext(repo.Ctx, args...)
8585
if err = cmd.RunWithContext(&RunContext{
8686
Timeout: -1,
8787
Dir: repo.Path,

services/gitdiff/gitdiff.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@ func GetDiff(gitRepo *git.Repository, opts *DiffOptions, files ...string) (*Diff
13761376
}()
13771377

13781378
go func(ctx context.Context, diffArgs []string, repoPath string, writer *io.PipeWriter) {
1379-
cmd := git.NewCommandContextNoGlobals(ctx, diffArgs...)
1379+
cmd := git.NewCommandContext(ctx, diffArgs...)
13801380
cmd.SetDescription(fmt.Sprintf("GetDiffRange [repo_path: %s]", repoPath))
13811381
if err := cmd.RunWithContext(&git.RunContext{
13821382
Timeout: time.Duration(setting.Git.Timeout.Default) * time.Second,

0 commit comments

Comments
 (0)