mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-25 11:07:56 +08:00
Serve .patch for pull requests (#3305)
* Serve .patch for pull requests Closes #3259 Updates "git" module, for GetFormatPatch * Handle io.Copy error
This commit is contained in:

committed by
Lauris BH

parent
18bb0f8f13
commit
44053532bb
5
vendor/code.gitea.io/git/command.go
generated
vendored
5
vendor/code.gitea.io/git/command.go
generated
vendored
@ -17,6 +17,9 @@ import (
|
||||
var (
|
||||
// GlobalCommandArgs global command args for external package setting
|
||||
GlobalCommandArgs []string
|
||||
|
||||
// DefaultCommandExecutionTimeout default command execution timeout duration
|
||||
DefaultCommandExecutionTimeout = 60 * time.Second
|
||||
)
|
||||
|
||||
// Command represents a command with its subcommands or arguments.
|
||||
@ -50,7 +53,7 @@ func (c *Command) AddArguments(args ...string) *Command {
|
||||
// it pipes stdout and stderr to given io.Writer.
|
||||
func (c *Command) RunInDirTimeoutPipeline(timeout time.Duration, dir string, stdout, stderr io.Writer) error {
|
||||
if timeout == -1 {
|
||||
timeout = 60 * time.Second
|
||||
timeout = DefaultCommandExecutionTimeout
|
||||
}
|
||||
|
||||
if len(dir) == 0 {
|
||||
|
Reference in New Issue
Block a user