Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-shell
Commits
947d4d49
Commit
947d4d49
authored
Jul 06, 2017
by
Kim "BKC" Carlbäcker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix vendor
parent
799417a3
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
56 deletions
+71
-56
go/vendor/gitlab.com/gitlab-org/gitaly/NOTICE
go/vendor/gitlab.com/gitlab-org/gitaly/NOTICE
+1
-1
go/vendor/gitlab.com/gitlab-org/gitaly/auth/rpccredentials.go
...endor/gitlab.com/gitlab-org/gitaly/auth/rpccredentials.go
+25
-0
go/vendor/gitlab.com/gitlab-org/gitaly/client/receive_pack.go
...endor/gitlab.com/gitlab-org/gitaly/client/receive_pack.go
+3
-23
go/vendor/gitlab.com/gitlab-org/gitaly/client/std_stream.go
go/vendor/gitlab.com/gitlab-org/gitaly/client/std_stream.go
+26
-6
go/vendor/gitlab.com/gitlab-org/gitaly/client/upload_pack.go
go/vendor/gitlab.com/gitlab-org/gitaly/client/upload_pack.go
+3
-23
go/vendor/vendor.json
go/vendor/vendor.json
+13
-3
No files found.
go/vendor/gitlab.com/gitlab-org/gitaly/NOTICE
View file @
947d4d49
...
...
@@ -77,7 +77,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LICENSE - gitlab.com/gitlab-org/gitaly/internal/
service/
middleware/panichandler
LICENSE - gitlab.com/gitlab-org/gitaly/internal/middleware/panichandler
Copyright (c) 2016 Masahiro Sano
MIT License
...
...
go/vendor/gitlab.com/gitlab-org/gitaly/auth/rpccredentials.go
0 → 100644
View file @
947d4d49
package
gitalyauth
import
(
"encoding/base64"
"golang.org/x/net/context"
"google.golang.org/grpc/credentials"
)
// RPCCredentials can be used with grpc.WithPerRPCCredentials to create a
// grpc.DialOption that inserts the supplied token for authentication
// with a Gitaly server.
func
RPCCredentials
(
token
string
)
credentials
.
PerRPCCredentials
{
return
&
rpcCredentials
{
token
:
base64
.
StdEncoding
.
EncodeToString
([]
byte
(
token
))}
}
type
rpcCredentials
struct
{
token
string
}
func
(
*
rpcCredentials
)
RequireTransportSecurity
()
bool
{
return
false
}
func
(
rc
*
rpcCredentials
)
GetRequestMetadata
(
context
.
Context
,
...
string
)
(
map
[
string
]
string
,
error
)
{
return
map
[
string
]
string
{
"authorization"
:
"Bearer "
+
rc
.
token
},
nil
}
go/vendor/gitlab.com/gitlab-org/gitaly/client/receive_pack.go
View file @
947d4d49
package
client
import
(
"fmt"
"io"
"google.golang.org/grpc"
...
...
@@ -31,30 +30,11 @@ func ReceivePack(ctx context.Context, conn *grpc.ClientConn, stdin io.Reader, st
return
stream
.
Send
(
&
pb
.
SSHReceivePackRequest
{
Stdin
:
p
})
})
errC
:=
make
(
chan
error
,
1
)
go
func
(
)
{
return
streamHandler
(
func
()
(
stdoutStderrResponse
,
error
)
{
return
stream
.
Recv
()
},
func
(
errC
chan
error
)
{
_
,
errRecv
:=
io
.
Copy
(
inWriter
,
stdin
)
stream
.
CloseSend
()
errC
<-
errRecv
}()
exitStatus
,
errRecv
:=
recvStdoutStderrStream
(
func
()
(
stdoutStderrResponse
,
error
)
{
return
stream
.
Recv
()
},
stdout
,
stderr
)
if
errRecv
!=
nil
{
return
exitStatus
,
errRecv
}
select
{
case
errSend
:=
<-
errC
:
if
errSend
!=
nil
{
// This should not happen
errSend
=
fmt
.
Errorf
(
"stdin send error: %v"
,
errSend
)
}
return
exitStatus
,
errSend
default
:
return
exitStatus
,
nil
}
}
go/vendor/gitlab.com/gitlab-org/gitaly/client/std_stream.go
View file @
947d4d49
package
client
import
(
"fmt"
"io"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
...
...
@@ -12,12 +13,17 @@ type stdoutStderrResponse interface {
GetStdout
()
[]
byte
}
func
recvStdoutStderrStream
(
recv
func
()
(
stdoutStderrResponse
,
error
),
stdout
,
stderr
io
.
Writer
)
(
int32
,
error
)
{
func
streamHandler
(
recv
func
()
(
stdoutStderrResponse
,
error
),
send
func
(
chan
error
),
stdout
,
stderr
io
.
Writer
)
(
int32
,
error
)
{
var
(
exitStatus
int32
err
error
resp
stdoutStderrResponse
)
errC
:=
make
(
chan
error
,
1
)
go
send
(
errC
)
for
{
resp
,
err
=
recv
()
if
err
!=
nil
{
...
...
@@ -28,19 +34,33 @@ func recvStdoutStderrStream(recv func() (stdoutStderrResponse, error), stdout, s
}
if
len
(
resp
.
GetStderr
())
>
0
{
if
_
,
err
Write
:=
stderr
.
Write
(
resp
.
GetStderr
());
errWrite
!=
nil
{
return
exitStatus
,
errWrite
if
_
,
err
=
stderr
.
Write
(
resp
.
GetStderr
());
err
!=
nil
{
break
}
}
if
len
(
resp
.
GetStdout
())
>
0
{
if
_
,
err
Write
:=
stdout
.
Write
(
resp
.
GetStdout
());
errWrite
!=
nil
{
return
exitStatus
,
errWrite
if
_
,
err
=
stdout
.
Write
(
resp
.
GetStdout
());
err
!=
nil
{
break
}
}
}
if
err
==
io
.
EOF
{
err
=
nil
}
if
err
!=
nil
{
return
exitStatus
,
err
}
select
{
case
errSend
:=
<-
errC
:
if
errSend
!=
nil
{
// This should not happen
errSend
=
fmt
.
Errorf
(
"stdin send error: %v"
,
errSend
)
}
return
exitStatus
,
errSend
default
:
return
exitStatus
,
nil
}
}
go/vendor/gitlab.com/gitlab-org/gitaly/client/upload_pack.go
View file @
947d4d49
package
client
import
(
"fmt"
"io"
"google.golang.org/grpc"
...
...
@@ -31,30 +30,11 @@ func UploadPack(ctx context.Context, conn *grpc.ClientConn, stdin io.Reader, std
return
stream
.
Send
(
&
pb
.
SSHUploadPackRequest
{
Stdin
:
p
})
})
errC
:=
make
(
chan
error
,
1
)
go
func
(
)
{
return
streamHandler
(
func
()
(
stdoutStderrResponse
,
error
)
{
return
stream
.
Recv
()
},
func
(
errC
chan
error
)
{
_
,
errRecv
:=
io
.
Copy
(
inWriter
,
stdin
)
stream
.
CloseSend
()
errC
<-
errRecv
}()
exitStatus
,
errRecv
:=
recvStdoutStderrStream
(
func
()
(
stdoutStderrResponse
,
error
)
{
return
stream
.
Recv
()
},
stdout
,
stderr
)
if
errRecv
!=
nil
{
return
exitStatus
,
errRecv
}
select
{
case
errSend
:=
<-
errC
:
if
errSend
!=
nil
{
// This should not happen
errSend
=
fmt
.
Errorf
(
"stdin send error: %v"
,
errSend
)
}
return
exitStatus
,
errSend
default
:
return
exitStatus
,
nil
}
}
go/vendor/vendor.json
View file @
947d4d49
...
...
@@ -30,10 +30,20 @@
"versionExact"
:
"v0.9.0"
},
{
"checksumSHA1"
:
"xDXnu1dEiNdrGdL1VfuCnJZey7s="
,
"checksumSHA1"
:
"dUHJbKas746n5fLzlwxHb6FOCxs="
,
"path"
:
"gitlab.com/gitlab-org/gitaly/auth"
,
"revision"
:
"e4f8d3d14cc3fe673cb511fb4d0189b68a158ccd"
,
"revisionTime"
:
"2017-06-30T12:58:40Z"
,
"version"
:
"v0.14.0"
,
"versionExact"
:
"v0.14.0"
},
{
"checksumSHA1"
:
"Z/BteCm3WErBI8bBmSN9gD+3EbU="
,
"path"
:
"gitlab.com/gitlab-org/gitaly/client"
,
"revision"
:
"cf955be6f08f16cca367a97d1ac2631a2ba33be3"
,
"revisionTime"
:
"2017-06-25T13:40:46Z"
"revision"
:
"e4f8d3d14cc3fe673cb511fb4d0189b68a158ccd"
,
"revisionTime"
:
"2017-06-30T12:58:40Z"
,
"version"
:
"v0.14.0"
,
"versionExact"
:
"v0.14.0"
},
{
"checksumSHA1"
:
"Y+HGqEkYM15ir+J93MEaHdyFy0c="
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment