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
61d6c6dc
Commit
61d6c6dc
authored
Jul 18, 2017
by
Kim "BKC" Carlbäcker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update vendoring for gitaly
parent
5f1ab210
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1062 additions
and
191 deletions
+1062
-191
CHANGELOG
CHANGELOG
+3
-0
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/VERSION
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/VERSION
+1
-1
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/blob.pb.go
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/blob.pb.go
+15
-0
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/commit.pb.go
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/commit.pb.go
+530
-44
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/diff.pb.go
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/diff.pb.go
+123
-32
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/helper/inforefs.go
.../gitlab.com/gitlab-org/gitaly-proto/go/helper/inforefs.go
+0
-32
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/helper/stream.go
...or/gitlab.com/gitlab-org/gitaly-proto/go/helper/stream.go
+0
-44
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/repository-service.pb.go
...b.com/gitlab-org/gitaly-proto/go/repository-service.pb.go
+215
-12
go/vendor/gitlab.com/gitlab-org/gitaly/client/receive_pack.go
...endor/gitlab.com/gitlab-org/gitaly/client/receive_pack.go
+6
-6
go/vendor/gitlab.com/gitlab-org/gitaly/client/upload_pack.go
go/vendor/gitlab.com/gitlab-org/gitaly/client/upload_pack.go
+6
-6
go/vendor/gitlab.com/gitlab-org/gitaly/streamio/stream.go
go/vendor/gitlab.com/gitlab-org/gitaly/streamio/stream.go
+136
-0
go/vendor/vendor.json
go/vendor/vendor.json
+27
-14
No files found.
CHANGELOG
View file @
61d6c6dc
v5.4.0
- Update Gitaly vendoring to use new RPC calls instead of old deprecated ones
v5.3.1
v5.3.1
- Gracefully handle internal API errors when getting merge request URLs
- Gracefully handle internal API errors when getting merge request URLs
...
...
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/VERSION
View file @
61d6c6dc
0.1
4
.0
0.1
7
.0
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/blob.pb.go
View file @
61d6c6dc
...
@@ -19,6 +19,8 @@ It is generated from these files:
...
@@ -19,6 +19,8 @@ It is generated from these files:
It has these top-level messages:
It has these top-level messages:
GetBlobRequest
GetBlobRequest
GetBlobResponse
GetBlobResponse
CommitStatsRequest
CommitStatsResponse
CommitIsAncestorRequest
CommitIsAncestorRequest
CommitIsAncestorResponse
CommitIsAncestorResponse
TreeEntryRequest
TreeEntryRequest
...
@@ -27,6 +29,13 @@ It has these top-level messages:
...
@@ -27,6 +29,13 @@ It has these top-level messages:
CommitsBetweenResponse
CommitsBetweenResponse
CountCommitsRequest
CountCommitsRequest
CountCommitsResponse
CountCommitsResponse
TreeEntry
GetTreeEntriesRequest
GetTreeEntriesResponse
ListFilesRequest
ListFilesResponse
FindCommitRequest
FindCommitResponse
CommitDiffRequest
CommitDiffRequest
CommitDiffResponse
CommitDiffResponse
CommitDeltaRequest
CommitDeltaRequest
...
@@ -48,6 +57,12 @@ It has these top-level messages:
...
@@ -48,6 +57,12 @@ It has these top-level messages:
FindLocalBranchCommitAuthor
FindLocalBranchCommitAuthor
RepositoryExistsRequest
RepositoryExistsRequest
RepositoryExistsResponse
RepositoryExistsResponse
RepackIncrementalRequest
RepackIncrementalResponse
RepackFullRequest
RepackFullResponse
GarbageCollectRequest
GarbageCollectResponse
Repository
Repository
GitCommit
GitCommit
CommitAuthor
CommitAuthor
...
...
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/commit.pb.go
View file @
61d6c6dc
This diff is collapsed.
Click to expand it.
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/diff.pb.go
View file @
61d6c6dc
This diff is collapsed.
Click to expand it.
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/helper/inforefs.go
deleted
100644 → 0
View file @
5f1ab210
package
helper
import
(
"io"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
)
type
InfoRefsClient
interface
{
Recv
()
(
*
pb
.
InfoRefsResponse
,
error
)
}
type
InfoRefsClientWriterTo
struct
{
InfoRefsClient
}
func
(
clientReader
*
InfoRefsClientWriterTo
)
WriteTo
(
w
io
.
Writer
)
(
total
int64
,
err
error
)
{
for
{
response
,
err
:=
clientReader
.
Recv
()
if
err
==
io
.
EOF
{
return
total
,
nil
}
else
if
err
!=
nil
{
return
total
,
err
}
n
,
err
:=
w
.
Write
(
response
.
GetData
())
total
+=
int64
(
n
)
if
err
!=
nil
{
return
total
,
err
}
}
}
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/helper/stream.go
deleted
100644 → 0
View file @
5f1ab210
package
helper
import
(
"io"
)
// NewReceiveReader turns receiver into an io.Reader. Errors from the
// receiver function are passed on unmodified. This means receiver should
// emit io.EOF when done.
func
NewReceiveReader
(
receiver
func
()
([]
byte
,
error
))
io
.
Reader
{
return
&
receiveReader
{
receiver
:
receiver
}
}
type
receiveReader
struct
{
receiver
func
()
([]
byte
,
error
)
data
[]
byte
err
error
}
func
(
rr
*
receiveReader
)
Read
(
p
[]
byte
)
(
int
,
error
)
{
if
len
(
rr
.
data
)
==
0
{
rr
.
data
,
rr
.
err
=
rr
.
receiver
()
}
n
:=
copy
(
p
,
rr
.
data
)
rr
.
data
=
rr
.
data
[
n
:
]
if
len
(
rr
.
data
)
==
0
{
return
n
,
rr
.
err
}
return
n
,
nil
}
// NewSendWriter turns sender into an io.Writer. The number of 'bytes
// written' reported back is always len(p).
func
NewSendWriter
(
sender
func
(
p
[]
byte
)
error
)
io
.
Writer
{
return
&
sendWriter
{
sender
:
sender
}
}
type
sendWriter
struct
{
sender
func
([]
byte
)
error
}
func
(
sw
*
sendWriter
)
Write
(
p
[]
byte
)
(
int
,
error
)
{
return
len
(
p
),
sw
.
sender
(
p
)
}
go/vendor/gitlab.com/gitlab-org/gitaly-proto/go/repository-service.pb.go
View file @
61d6c6dc
This diff is collapsed.
Click to expand it.
go/vendor/gitlab.com/gitlab-org/gitaly/client/receive_pack.go
View file @
61d6c6dc
...
@@ -3,12 +3,12 @@ package client
...
@@ -3,12 +3,12 @@ package client
import
(
import
(
"io"
"io"
"google.golang.org/grpc"
"gitlab.com/gitlab-org/gitaly/streamio"
"golang.org/x/net/context"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
pbhelper
"gitlab.com/gitlab-org/gitaly-proto/go/helper"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
)
// ReceivePack proxies an SSH git-receive-pack (git push) session to Gitaly
// ReceivePack proxies an SSH git-receive-pack (git push) session to Gitaly
...
@@ -16,7 +16,7 @@ func ReceivePack(ctx context.Context, conn *grpc.ClientConn, stdin io.Reader, st
...
@@ -16,7 +16,7 @@ func ReceivePack(ctx context.Context, conn *grpc.ClientConn, stdin io.Reader, st
ctx2
,
cancel
:=
context
.
WithCancel
(
ctx
)
ctx2
,
cancel
:=
context
.
WithCancel
(
ctx
)
defer
cancel
()
defer
cancel
()
ssh
:=
pb
.
NewSSHClient
(
conn
)
ssh
:=
pb
.
NewSSH
Service
Client
(
conn
)
stream
,
err
:=
ssh
.
SSHReceivePack
(
ctx2
)
stream
,
err
:=
ssh
.
SSHReceivePack
(
ctx2
)
if
err
!=
nil
{
if
err
!=
nil
{
return
0
,
err
return
0
,
err
...
@@ -26,7 +26,7 @@ func ReceivePack(ctx context.Context, conn *grpc.ClientConn, stdin io.Reader, st
...
@@ -26,7 +26,7 @@ func ReceivePack(ctx context.Context, conn *grpc.ClientConn, stdin io.Reader, st
return
0
,
err
return
0
,
err
}
}
inWriter
:=
pbhelper
.
NewSend
Writer
(
func
(
p
[]
byte
)
error
{
inWriter
:=
streamio
.
New
Writer
(
func
(
p
[]
byte
)
error
{
return
stream
.
Send
(
&
pb
.
SSHReceivePackRequest
{
Stdin
:
p
})
return
stream
.
Send
(
&
pb
.
SSHReceivePackRequest
{
Stdin
:
p
})
})
})
...
...
go/vendor/gitlab.com/gitlab-org/gitaly/client/upload_pack.go
View file @
61d6c6dc
...
@@ -3,12 +3,12 @@ package client
...
@@ -3,12 +3,12 @@ package client
import
(
import
(
"io"
"io"
"google.golang.org/grpc"
"gitlab.com/gitlab-org/gitaly/streamio"
"golang.org/x/net/context"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
pbhelper
"gitlab.com/gitlab-org/gitaly-proto/go/helper"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
)
// UploadPack proxies an SSH git-upload-pack (git fetch) session to Gitaly
// UploadPack proxies an SSH git-upload-pack (git fetch) session to Gitaly
...
@@ -16,7 +16,7 @@ func UploadPack(ctx context.Context, conn *grpc.ClientConn, stdin io.Reader, std
...
@@ -16,7 +16,7 @@ func UploadPack(ctx context.Context, conn *grpc.ClientConn, stdin io.Reader, std
ctx2
,
cancel
:=
context
.
WithCancel
(
ctx
)
ctx2
,
cancel
:=
context
.
WithCancel
(
ctx
)
defer
cancel
()
defer
cancel
()
ssh
:=
pb
.
NewSSHClient
(
conn
)
ssh
:=
pb
.
NewSSH
Service
Client
(
conn
)
stream
,
err
:=
ssh
.
SSHUploadPack
(
ctx2
)
stream
,
err
:=
ssh
.
SSHUploadPack
(
ctx2
)
if
err
!=
nil
{
if
err
!=
nil
{
return
0
,
err
return
0
,
err
...
@@ -26,7 +26,7 @@ func UploadPack(ctx context.Context, conn *grpc.ClientConn, stdin io.Reader, std
...
@@ -26,7 +26,7 @@ func UploadPack(ctx context.Context, conn *grpc.ClientConn, stdin io.Reader, std
return
0
,
err
return
0
,
err
}
}
inWriter
:=
pbhelper
.
NewSend
Writer
(
func
(
p
[]
byte
)
error
{
inWriter
:=
streamio
.
New
Writer
(
func
(
p
[]
byte
)
error
{
return
stream
.
Send
(
&
pb
.
SSHUploadPackRequest
{
Stdin
:
p
})
return
stream
.
Send
(
&
pb
.
SSHUploadPackRequest
{
Stdin
:
p
})
})
})
...
...
go/vendor/gitlab.com/gitlab-org/gitaly/streamio/stream.go
0 → 100644
View file @
61d6c6dc
// Package streamio contains wrappers intended for turning gRPC streams
// that send/receive messages with a []byte field into io.Writers and
// io.Readers.
//
package
streamio
import
(
"io"
"os"
"strconv"
)
func
init
()
{
bufSize64
,
err
:=
strconv
.
ParseInt
(
os
.
Getenv
(
"GITALY_STREAMIO_WRITE_BUFFER_SIZE"
),
10
,
32
)
if
err
==
nil
&&
bufSize64
>
0
{
WriteBufferSize
=
int
(
bufSize64
)
}
}
// NewReader turns receiver into an io.Reader. Errors from the receiver
// function are passed on unmodified. This means receiver should emit
// io.EOF when done.
func
NewReader
(
receiver
func
()
([]
byte
,
error
))
io
.
Reader
{
return
&
receiveReader
{
receiver
:
receiver
}
}
type
receiveReader
struct
{
receiver
func
()
([]
byte
,
error
)
data
[]
byte
err
error
}
func
(
rr
*
receiveReader
)
Read
(
p
[]
byte
)
(
int
,
error
)
{
if
len
(
rr
.
data
)
==
0
{
rr
.
data
,
rr
.
err
=
rr
.
receiver
()
}
n
:=
copy
(
p
,
rr
.
data
)
rr
.
data
=
rr
.
data
[
n
:
]
if
len
(
rr
.
data
)
==
0
{
return
n
,
rr
.
err
}
return
n
,
nil
}
// WriteTo implements io.WriterTo.
func
(
rr
*
receiveReader
)
WriteTo
(
w
io
.
Writer
)
(
int64
,
error
)
{
var
written
int64
// Deal with left-over state in rr.data and rr.err, if any
if
len
(
rr
.
data
)
>
0
{
n
,
err
:=
w
.
Write
(
rr
.
data
)
written
+=
int64
(
n
)
if
err
!=
nil
{
return
written
,
err
}
}
if
rr
.
err
!=
nil
{
return
written
,
rr
.
err
}
// Consume the response stream
var
errRead
,
errWrite
error
var
n
int
var
buf
[]
byte
for
errWrite
==
nil
&&
errRead
!=
io
.
EOF
{
buf
,
errRead
=
rr
.
receiver
()
if
errRead
!=
nil
&&
errRead
!=
io
.
EOF
{
return
written
,
errRead
}
if
len
(
buf
)
>
0
{
n
,
errWrite
=
w
.
Write
(
buf
)
written
+=
int64
(
n
)
}
}
return
written
,
errWrite
}
// NewWriter turns sender into an io.Writer. The sender callback will
// receive []byte arguments of length at most WriteBufferSize.
func
NewWriter
(
sender
func
(
p
[]
byte
)
error
)
io
.
Writer
{
return
&
sendWriter
{
sender
:
sender
}
}
// WriteBufferSize is the largest []byte that Write() will pass to its
// underlying send function. This value can be changed at runtime using
// the GITALY_STREAMIO_WRITE_BUFFER_SIZE environment variable.
var
WriteBufferSize
=
128
*
1024
type
sendWriter
struct
{
sender
func
([]
byte
)
error
}
func
(
sw
*
sendWriter
)
Write
(
p
[]
byte
)
(
int
,
error
)
{
var
sent
int
for
len
(
p
)
>
0
{
chunkSize
:=
len
(
p
)
if
chunkSize
>
WriteBufferSize
{
chunkSize
=
WriteBufferSize
}
if
err
:=
sw
.
sender
(
p
[
:
chunkSize
]);
err
!=
nil
{
return
sent
,
err
}
sent
+=
chunkSize
p
=
p
[
chunkSize
:
]
}
return
sent
,
nil
}
// ReadFrom implements io.ReaderFrom.
func
(
sw
*
sendWriter
)
ReadFrom
(
r
io
.
Reader
)
(
int64
,
error
)
{
var
nRead
int64
buf
:=
make
([]
byte
,
WriteBufferSize
)
var
errRead
,
errSend
error
for
errSend
==
nil
&&
errRead
!=
io
.
EOF
{
var
n
int
n
,
errRead
=
r
.
Read
(
buf
)
nRead
+=
int64
(
n
)
if
errRead
!=
nil
&&
errRead
!=
io
.
EOF
{
return
nRead
,
errRead
}
if
n
>
0
{
errSend
=
sw
.
sender
(
buf
[
:
n
])
}
}
return
nRead
,
errSend
}
go/vendor/vendor.json
View file @
61d6c6dc
...
@@ -21,29 +21,37 @@
...
@@ -21,29 +21,37 @@
"revisionTime"
:
"2017-03-31T03:19:02Z"
"revisionTime"
:
"2017-03-31T03:19:02Z"
},
},
{
{
"checksumSHA1"
:
"
FPNHA80Wu9QTcNcjbuw0kdLOg5Q
="
,
"checksumSHA1"
:
"
dTfc2UncJV8JxRznLbc0itGp8SI
="
,
"path"
:
"gitlab.com/gitlab-org/gitaly-proto/go"
,
"path"
:
"gitlab.com/gitlab-org/gitaly-proto/go"
,
"revision"
:
"
e73c809c669748d0f49e257a249c4c12b59f7968
"
,
"revision"
:
"
c7790557c271c6e082c9e7cfa9e63380a7643dcf
"
,
"revisionTime"
:
"2017-07-
07T12:10
:40Z"
,
"revisionTime"
:
"2017-07-
14T18:05
:40Z"
,
"tree"
:
true
,
"tree"
:
true
,
"version"
:
"v0.1
4
.0"
,
"version"
:
"v0.1
7
.0"
,
"versionExact"
:
"v0.1
4
.0"
"versionExact"
:
"v0.1
7
.0"
},
},
{
{
"checksumSHA1"
:
"dUHJbKas746n5fLzlwxHb6FOCxs="
,
"checksumSHA1"
:
"dUHJbKas746n5fLzlwxHb6FOCxs="
,
"path"
:
"gitlab.com/gitlab-org/gitaly/auth"
,
"path"
:
"gitlab.com/gitlab-org/gitaly/auth"
,
"revision"
:
"
e4f8d3d14cc3fe673cb511fb4d0189b68a158cc
d"
,
"revision"
:
"
421641a7cd5a5d7edd8008a8089acbe9335b7f3
d"
,
"revisionTime"
:
"2017-0
6-30T12:58:40
Z"
,
"revisionTime"
:
"2017-0
7-18T12:50:12
Z"
,
"version"
:
"v0.
14.0
"
,
"version"
:
"v0.
21.2
"
,
"versionExact"
:
"v0.
14.0
"
"versionExact"
:
"v0.
21.2
"
},
},
{
{
"checksumSHA1"
:
"
Z/BteCm3WErBI8bBmSN9gD+3EbU
="
,
"checksumSHA1"
:
"
qlzYmQ21XX/voiKWHDWUZ3lybGQ
="
,
"path"
:
"gitlab.com/gitlab-org/gitaly/client"
,
"path"
:
"gitlab.com/gitlab-org/gitaly/client"
,
"revision"
:
"e4f8d3d14cc3fe673cb511fb4d0189b68a158ccd"
,
"revision"
:
"421641a7cd5a5d7edd8008a8089acbe9335b7f3d"
,
"revisionTime"
:
"2017-06-30T12:58:40Z"
,
"revisionTime"
:
"2017-07-18T12:50:12Z"
,
"version"
:
"v0.14.0"
,
"version"
:
"v0.21.2"
,
"versionExact"
:
"v0.14.0"
"versionExact"
:
"v0.21.2"
},
{
"checksumSHA1"
:
"mifcYH0qXpoPkX5KzXoM3mterWQ="
,
"path"
:
"gitlab.com/gitlab-org/gitaly/streamio"
,
"revision"
:
"421641a7cd5a5d7edd8008a8089acbe9335b7f3d"
,
"revisionTime"
:
"2017-07-18T12:50:12Z"
,
"version"
:
"v0.21.2"
,
"versionExact"
:
"v0.21.2"
},
},
{
{
"checksumSHA1"
:
"Y+HGqEkYM15ir+J93MEaHdyFy0c="
,
"checksumSHA1"
:
"Y+HGqEkYM15ir+J93MEaHdyFy0c="
,
...
@@ -230,6 +238,11 @@
...
@@ -230,6 +238,11 @@
"path"
:
"gopkg.in/yaml.v2"
,
"path"
:
"gopkg.in/yaml.v2"
,
"revision"
:
"cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b"
,
"revision"
:
"cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b"
,
"revisionTime"
:
"2017-04-07T17:21:22Z"
"revisionTime"
:
"2017-04-07T17:21:22Z"
},
{
"path"
:
"vendor/gitlab.com/gitlab-org/gitaly/streamio"
,
"revision"
:
"v0.21.2"
,
"version"
:
"v0.21.2"
}
}
],
],
"rootPath"
:
"gitlab.com/gitlab-org/gitlab-shell/go"
"rootPath"
:
"gitlab.com/gitlab-org/gitlab-shell/go"
...
...
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