diff options
author | Antoine GIRARD <sapk@users.noreply.github.com> | 2019-07-31 18:45:42 +0200 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-07-31 12:45:42 -0400 |
commit | a9b4c8171f3b62a951079cdca67e4cf703eb4cc1 (patch) | |
tree | b52f51ec06fb0b91958708b958f7c15c1623e9d1 /vendor/github.com/kevinburke/ssh_config/parser.go | |
parent | bb875e98a1ee4a30c67a3b879f924e88789baf67 (diff) | |
download | gitea-a9b4c8171f3b62a951079cdca67e4cf703eb4cc1.tar.gz gitea-a9b4c8171f3b62a951079cdca67e4cf703eb4cc1.zip |
Update src-d/go-git to v4.13.0 (#7688)
* update gopkg.in/src-d/go-git.v4 v4.13.0
* mod tidy
* vendor
Diffstat (limited to 'vendor/github.com/kevinburke/ssh_config/parser.go')
-rw-r--r-- | vendor/github.com/kevinburke/ssh_config/parser.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vendor/github.com/kevinburke/ssh_config/parser.go b/vendor/github.com/kevinburke/ssh_config/parser.go index 02745b4b29..36c42055f5 100644 --- a/vendor/github.com/kevinburke/ssh_config/parser.go +++ b/vendor/github.com/kevinburke/ssh_config/parser.go @@ -149,7 +149,7 @@ func (p *sshParser) parseKV() sshParserStateFn { Value: val.val, Comment: comment, hasEquals: hasEquals, - leadingSpace: uint16(key.Position.Col) - 1, + leadingSpace: key.Position.Col - 1, position: key.Position, } lastHost.Nodes = append(lastHost.Nodes, kv) @@ -169,6 +169,12 @@ func (p *sshParser) parseComment() sshParserStateFn { } func parseSSH(flow chan token, system bool, depth uint8) *Config { + // Ensure we consume tokens to completion even if parser exits early + defer func() { + for range flow { + } + }() + result := newConfig() result.position = Position{1, 1} parser := &sshParser{ |