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
1313bc17
Commit
1313bc17
authored
Aug 02, 2018
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for GitConfigOptions required for git-receive-pack command
parent
75f39661
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
internal/api/api.go
internal/api/api.go
+2
-0
internal/git/receive-pack.go
internal/git/receive-pack.go
+1
-1
internal/gitaly/smarthttp.go
internal/gitaly/smarthttp.go
+7
-6
No files found.
internal/api/api.go
View file @
1313bc17
...
...
@@ -107,6 +107,8 @@ type Response struct {
// RepoPath is the full path on disk to the Git repository the request is
// about
RepoPath
string
// GitConfigOptions holds the custom options that we want to pass to the git command
GitConfigOptions
[]
string
// StoreLFSPath is provided by the GitLab Rails application to mark where the tmp file should be placed.
// This field is deprecated. GitLab will use TempPath instead
StoreLFSPath
string
...
...
internal/git/receive-pack.go
View file @
1313bc17
...
...
@@ -54,7 +54,7 @@ func handleReceivePackWithGitaly(ctx context.Context, a *api.Response, clientReq
return
fmt
.
Errorf
(
"smarthttp.ReceivePack: %v"
,
err
)
}
if
err
:=
smarthttp
.
ReceivePack
(
ctx
,
&
a
.
Repository
,
a
.
GL_ID
,
a
.
GL_USERNAME
,
a
.
GL_REPOSITORY
,
clientRequest
,
clientResponse
,
gitProtocol
);
err
!=
nil
{
if
err
:=
smarthttp
.
ReceivePack
(
ctx
,
&
a
.
Repository
,
a
.
GL_ID
,
a
.
GL_USERNAME
,
a
.
GL_REPOSITORY
,
a
.
GitConfigOptions
,
clientRequest
,
clientResponse
,
gitProtocol
);
err
!=
nil
{
return
fmt
.
Errorf
(
"smarthttp.ReceivePack: %v"
,
err
)
}
...
...
internal/gitaly/smarthttp.go
View file @
1313bc17
...
...
@@ -43,18 +43,19 @@ func infoRefsReader(stream infoRefsClient) io.Reader {
})
}
func
(
client
*
SmartHTTPClient
)
ReceivePack
(
ctx
context
.
Context
,
repo
*
pb
.
Repository
,
glId
string
,
glUsername
string
,
glRepository
string
,
clientRequest
io
.
Reader
,
clientResponse
io
.
Writer
,
gitProtocol
string
)
error
{
func
(
client
*
SmartHTTPClient
)
ReceivePack
(
ctx
context
.
Context
,
repo
*
pb
.
Repository
,
glId
string
,
glUsername
string
,
glRepository
string
,
gitConfigOptions
[]
string
,
clientRequest
io
.
Reader
,
clientResponse
io
.
Writer
,
gitProtocol
string
)
error
{
stream
,
err
:=
client
.
PostReceivePack
(
ctx
)
if
err
!=
nil
{
return
err
}
rpcRequest
:=
&
pb
.
PostReceivePackRequest
{
Repository
:
repo
,
GlId
:
glId
,
GlUsername
:
glUsername
,
GlRepository
:
glRepository
,
GitProtocol
:
gitProtocol
,
Repository
:
repo
,
GlId
:
glId
,
GlUsername
:
glUsername
,
GlRepository
:
glRepository
,
GitConfigOptions
:
gitConfigOptions
,
GitProtocol
:
gitProtocol
,
}
if
err
:=
stream
.
Send
(
rpcRequest
);
err
!=
nil
{
...
...
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