mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 10:54:25 +02:00
Refactor git command stdio pipe (#36422)
Most potential deadlock problems should have been fixed, and new code is unlikely to cause new problems with the new design. Also raise the minimum Git version required to 2.6.0 (released in 2015)
This commit is contained in:
1 parent
2a56c4ec3b
commit
3a09d7aa8d
63 files changed
+767
-1016
No files matched your search
@@ -526,9 +526,9 @@ func checkIfPRContentChanged(ctx context.Context, pr *issues_model.PullRequest,
|
||||
|
||||
cmd := gitcmd.NewCommand("diff", "--name-only", "-z").AddDynamicArguments(newCommitID, oldCommitID, mergeBase)
|
||||
|
||||
var stdoutReader io.ReadCloser
|
||||
stdoutReader, stdoutReaderClose := cmd.MakeStdoutPipe()
|
||||
defer stdoutReaderClose()
|
||||
if err := cmd.WithDir(prCtx.tmpBasePath).
|
||||
WithStdoutReader(&stdoutReader).
|
||||
WithPipelineFunc(func(ctx gitcmd.Context) error {
|
||||
return util.IsEmptyReader(stdoutReader)
|
||||
}).
|
||||
|
||||
Reference in new issue
Block a user