aboutsummaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
Diffstat (limited to 'vendor')
-rw-r--r--vendor/code.gitea.io/git/MAINTAINERS1
-rw-r--r--vendor/code.gitea.io/git/command.go5
-rw-r--r--vendor/code.gitea.io/git/repo_pull.go14
-rw-r--r--vendor/vendor.json6
4 files changed, 22 insertions, 4 deletions
diff --git a/vendor/code.gitea.io/git/MAINTAINERS b/vendor/code.gitea.io/git/MAINTAINERS
index 2ad3f01f5d..4f3aab3183 100644
--- a/vendor/code.gitea.io/git/MAINTAINERS
+++ b/vendor/code.gitea.io/git/MAINTAINERS
@@ -7,6 +7,7 @@ Kim Carlbäcker <kim.carlbacker@gmail.com> (@bkcsoft)
LefsFlare <nobody@nobody.tld> (@LefsFlarey)
Lunny Xiao <xiaolunwen@gmail.com> (@lunny)
Matthias Loibl <mail@matthiasloibl.com> (@metalmatze)
+Morgan Bazalgette <the@howl.moe> (@thehowl)
Rachid Zarouali <nobody@nobody.tld> (@xinity)
Rémy Boulanouar <admin@dblk.org> (@DblK)
Sandro Santilli <strk@kbt.io> (@strk)
diff --git a/vendor/code.gitea.io/git/command.go b/vendor/code.gitea.io/git/command.go
index 06722c213b..8ca99fd6d3 100644
--- a/vendor/code.gitea.io/git/command.go
+++ b/vendor/code.gitea.io/git/command.go
@@ -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 {
diff --git a/vendor/code.gitea.io/git/repo_pull.go b/vendor/code.gitea.io/git/repo_pull.go
index 1c45a4e027..c6d97a6fd1 100644
--- a/vendor/code.gitea.io/git/repo_pull.go
+++ b/vendor/code.gitea.io/git/repo_pull.go
@@ -5,8 +5,10 @@
package git
import (
+ "bytes"
"container/list"
"fmt"
+ "io"
"strconv"
"strings"
"time"
@@ -73,3 +75,15 @@ func (repo *Repository) GetPullRequestInfo(basePath, baseBranch, headBranch stri
func (repo *Repository) GetPatch(base, head string) ([]byte, error) {
return NewCommand("diff", "-p", "--binary", base, head).RunInDirBytes(repo.Path)
}
+
+// GetFormatPatch generates and returns format-patch data between given revisions.
+func (repo *Repository) GetFormatPatch(base, head string) (io.Reader, error) {
+ stdout := new(bytes.Buffer)
+ stderr := new(bytes.Buffer)
+
+ if err := NewCommand("format-patch", "--binary", "--stdout", base+"..."+head).
+ RunInDirPipeline(repo.Path, stdout, stderr); err != nil {
+ return nil, concatenateError(err, stderr.String())
+ }
+ return stdout, nil
+}
diff --git a/vendor/vendor.json b/vendor/vendor.json
index 828bdd4e43..51f758fd2f 100644
--- a/vendor/vendor.json
+++ b/vendor/vendor.json
@@ -3,10 +3,10 @@
"ignore": "test appengine",
"package": [
{
- "checksumSHA1": "Em29XiKkOh5rFFXdkCjqqsQ7fe4=",
+ "checksumSHA1": "1WHdGmDRsFRTD5N69l+MEbZr+nM=",
"path": "code.gitea.io/git",
- "revision": "4ec3654064ef7eef4f05f891073a38039ad8d0f7",
- "revisionTime": "2017-12-22T02:43:26Z"
+ "revision": "f4a91053671bee69f1995e456c1541668717c19d",
+ "revisionTime": "2018-01-07T06:11:05Z"
},
{
"checksumSHA1": "Qtq0kW+BnpYMOriaoCjMa86WGG8=",