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
51fe7f28
Commit
51fe7f28
authored
Jul 07, 2017
by
Kim "BKC" Carlbäcker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't make up exitCodes
parent
3c1e6316
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
go/internal/handler/receive_pack.go
go/internal/handler/receive_pack.go
+3
-3
go/internal/handler/upload_pack.go
go/internal/handler/upload_pack.go
+3
-3
No files found.
go/internal/handler/receive_pack.go
View file @
51fe7f28
...
...
@@ -14,7 +14,7 @@ import (
func
ReceivePack
(
gitalyAddress
string
,
request
*
pb
.
SSHReceivePackRequest
)
(
int32
,
error
)
{
if
gitalyAddress
==
""
{
return
-
1
,
fmt
.
Errorf
(
"no gitaly_address given"
)
return
0
,
fmt
.
Errorf
(
"no gitaly_address given"
)
}
connOpts
:=
client
.
DefaultDialOpts
...
...
@@ -24,11 +24,11 @@ func ReceivePack(gitalyAddress string, request *pb.SSHReceivePackRequest) (int32
conn
,
err
:=
client
.
Dial
(
gitalyAddress
,
connOpts
)
if
err
!=
nil
{
return
-
1
,
err
return
0
,
err
}
defer
conn
.
Close
()
ctx
,
cancel
:=
context
.
WithCancel
(
context
.
TODO
())
ctx
,
cancel
:=
context
.
WithCancel
(
context
.
Background
())
defer
cancel
()
return
client
.
ReceivePack
(
ctx
,
conn
,
os
.
Stdin
,
os
.
Stdout
,
os
.
Stderr
,
request
)
}
go/internal/handler/upload_pack.go
View file @
51fe7f28
...
...
@@ -14,7 +14,7 @@ import (
func
UploadPack
(
gitalyAddress
string
,
request
*
pb
.
SSHUploadPackRequest
)
(
int32
,
error
)
{
if
gitalyAddress
==
""
{
return
-
1
,
fmt
.
Errorf
(
"no gitaly_address given"
)
return
0
,
fmt
.
Errorf
(
"no gitaly_address given"
)
}
connOpts
:=
client
.
DefaultDialOpts
...
...
@@ -24,11 +24,11 @@ func UploadPack(gitalyAddress string, request *pb.SSHUploadPackRequest) (int32,
conn
,
err
:=
client
.
Dial
(
gitalyAddress
,
connOpts
)
if
err
!=
nil
{
return
-
1
,
err
return
0
,
err
}
defer
conn
.
Close
()
ctx
,
cancel
:=
context
.
WithCancel
(
context
.
TODO
())
ctx
,
cancel
:=
context
.
WithCancel
(
context
.
Background
())
defer
cancel
()
return
client
.
UploadPack
(
ctx
,
conn
,
os
.
Stdin
,
os
.
Stdout
,
os
.
Stderr
,
request
)
}
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