Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
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
1
Merge Requests
1
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-workhorse
Commits
a859867a
Commit
a859867a
authored
Mar 28, 2019
by
Patrick Bajao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unneeded call for helper.Fail500
parent
5273f2ca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
internal/git/archive.go
internal/git/archive.go
+3
-4
No files found.
internal/git/archive.go
View file @
a859867a
...
@@ -104,7 +104,7 @@ func (a *archive) Inject(w http.ResponseWriter, r *http.Request, sendData string
...
@@ -104,7 +104,7 @@ func (a *archive) Inject(w http.ResponseWriter, r *http.Request, sendData string
var
archiveReader
io
.
Reader
var
archiveReader
io
.
Reader
archiveReader
,
err
=
handleArchiveWithGitaly
(
w
,
r
,
params
,
format
)
archiveReader
,
err
=
handleArchiveWithGitaly
(
r
,
params
,
format
)
if
err
!=
nil
{
if
err
!=
nil
{
helper
.
Fail500
(
w
,
r
,
fmt
.
Errorf
(
"operations.GetArchive: %v"
,
err
))
helper
.
Fail500
(
w
,
r
,
fmt
.
Errorf
(
"operations.GetArchive: %v"
,
err
))
return
return
...
@@ -132,7 +132,7 @@ func (a *archive) Inject(w http.ResponseWriter, r *http.Request, sendData string
...
@@ -132,7 +132,7 @@ func (a *archive) Inject(w http.ResponseWriter, r *http.Request, sendData string
}
}
}
}
func
handleArchiveWithGitaly
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
,
params
archiveParams
,
format
gitalypb
.
GetArchiveRequest_Format
)
(
io
.
Reader
,
error
)
{
func
handleArchiveWithGitaly
(
r
*
http
.
Request
,
params
archiveParams
,
format
gitalypb
.
GetArchiveRequest_Format
)
(
io
.
Reader
,
error
)
{
var
request
*
gitalypb
.
GetArchiveRequest
var
request
*
gitalypb
.
GetArchiveRequest
c
,
err
:=
gitaly
.
NewRepositoryClient
(
params
.
GitalyServer
)
c
,
err
:=
gitaly
.
NewRepositoryClient
(
params
.
GitalyServer
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -143,8 +143,7 @@ func handleArchiveWithGitaly(w http.ResponseWriter, r *http.Request, params arch
...
@@ -143,8 +143,7 @@ func handleArchiveWithGitaly(w http.ResponseWriter, r *http.Request, params arch
request
=
&
gitalypb
.
GetArchiveRequest
{}
request
=
&
gitalypb
.
GetArchiveRequest
{}
if
err
:=
proto
.
Unmarshal
(
params
.
GetArchiveRequest
,
request
);
err
!=
nil
{
if
err
:=
proto
.
Unmarshal
(
params
.
GetArchiveRequest
,
request
);
err
!=
nil
{
helper
.
Fail500
(
w
,
r
,
fmt
.
Errorf
(
"SendArchive: unmarshal GetArchiveRequest: %v"
,
err
))
return
nil
,
fmt
.
Errorf
(
"unmarshal GetArchiveRequest: %v"
,
err
)
return
nil
,
err
}
}
}
else
{
}
else
{
request
=
&
gitalypb
.
GetArchiveRequest
{
request
=
&
gitalypb
.
GetArchiveRequest
{
...
...
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