forked from forgejo/forgejo
Update src-d/go-git to v4.13.0 (#7688)
* update gopkg.in/src-d/go-git.v4 v4.13.0 * mod tidy * vendor
This commit is contained in:
parent
bb875e98a1
commit
a9b4c8171f
131 changed files with 3148 additions and 406 deletions
2
vendor/gopkg.in/src-d/go-git.v4/config/branch.go
generated
vendored
2
vendor/gopkg.in/src-d/go-git.v4/config/branch.go
generated
vendored
|
@ -72,7 +72,7 @@ func (b *Branch) marshal() *format.Subsection {
|
|||
if b.Rebase == "" {
|
||||
b.raw.RemoveOption(rebaseKey)
|
||||
} else {
|
||||
b.raw.SetOption(rebaseKey, string(b.Rebase))
|
||||
b.raw.SetOption(rebaseKey, b.Rebase)
|
||||
}
|
||||
|
||||
return b.raw
|
||||
|
|
9
vendor/gopkg.in/src-d/go-git.v4/config/refspec.go
generated
vendored
9
vendor/gopkg.in/src-d/go-git.v4/config/refspec.go
generated
vendored
|
@ -18,7 +18,7 @@ var (
|
|||
ErrRefSpecMalformedWildcard = errors.New("malformed refspec, mismatched number of wildcards")
|
||||
)
|
||||
|
||||
// RefSpec is a mapping from local branches to remote references
|
||||
// RefSpec is a mapping from local branches to remote references.
|
||||
// The format of the refspec is an optional +, followed by <src>:<dst>, where
|
||||
// <src> is the pattern for references on the remote side and <dst> is where
|
||||
// those references will be written locally. The + tells Git to update the
|
||||
|
@ -127,6 +127,13 @@ func (s RefSpec) Dst(n plumbing.ReferenceName) plumbing.ReferenceName {
|
|||
return plumbing.ReferenceName(dst[0:wd] + match + dst[wd+1:])
|
||||
}
|
||||
|
||||
func (s RefSpec) Reverse() RefSpec {
|
||||
spec := string(s)
|
||||
separator := strings.Index(spec, refSpecSeparator)
|
||||
|
||||
return RefSpec(spec[separator+1:] + refSpecSeparator + spec[:separator])
|
||||
}
|
||||
|
||||
func (s RefSpec) String() string {
|
||||
return string(s)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue