Change summary
pkg/daemon/daemon.go | 4 ++++
pkg/ssh/cmd/git.go | 10 ++++++++++
pkg/ui/pages/repo/files.go | 4 ++++
pkg/web/git.go | 2 ++
4 files changed, 20 insertions(+)
Detailed changes
@@ -206,6 +206,10 @@ func (d *GitDaemon) handleClient(conn net.Conn) {
counter = uploadPackGitCounter
case git.UploadArchiveService:
counter = uploadArchiveGitCounter
+ case git.ReceivePackService, git.LFSTransferService:
+ // These services don't have counters in this context
+ d.fatal(c, git.ErrInvalidRequest)
+ return
default:
d.fatal(c, git.ErrInvalidRequest)
return
@@ -280,6 +280,11 @@ func gitRunE(cmd *cobra.Command, args []string) error {
defer func() {
uploadArchiveSeconds.WithLabelValues(name).Add(time.Since(start).Seconds())
}()
+ case git.UploadPackService, git.ReceivePackService, git.LFSTransferService:
+ uploadPackCounter.WithLabelValues(name).Inc()
+ defer func() {
+ uploadPackSeconds.WithLabelValues(name).Add(time.Since(start).Seconds())
+ }()
default:
uploadPackCounter.WithLabelValues(name).Inc()
defer func() {
@@ -326,6 +331,11 @@ func gitRunE(cmd *cobra.Command, args []string) error {
defer func() {
lfsTransferSeconds.WithLabelValues(name, operation).Add(time.Since(start).Seconds())
}()
+ case git.UploadPackService, git.UploadArchiveService, git.ReceivePackService:
+ lfsAuthenticateCounter.WithLabelValues(name, operation).Inc()
+ defer func() {
+ lfsAuthenticateSeconds.WithLabelValues(name, operation).Add(time.Since(start).Seconds())
+ }()
default:
lfsAuthenticateCounter.WithLabelValues(name, operation).Inc()
defer func() {
@@ -142,6 +142,8 @@ func (f *Files) ShortHelp() []key.Binding {
f.common.KeyMap.BackItem,
}
return b
+ case filesViewLoading:
+ return []key.Binding{}
default:
return []key.Binding{}
}
@@ -200,6 +202,8 @@ func (f *Files) FullHelp() [][]key.Binding {
f.common.KeyMap.GotoBottom,
},
}...)
+ case filesViewLoading:
+ // No help keys when loading
}
actionKeys = append([]key.Binding{
copyKey,
@@ -399,6 +399,8 @@ func serviceRpc(w http.ResponseWriter, r *http.Request) {
switch service {
case git.UploadPackService, git.ReceivePackService:
cmd.Args = append(cmd.Args, "--stateless-rpc")
+ case git.UploadArchiveService, git.LFSTransferService:
+ // No additional arguments needed for these services
}
user := proto.UserFromContext(ctx)