back interdiff of round #1 and #0

knotserver: fix commit counting for branch creation #447

merged
opened by oppi.li targeting master from push-ytkuzknmmrmn

rev-list was over-counting

Signed-off-by: oppiliappan me@oppi.li

files
knotserver
ERROR
knotserver/git/post_receive.go

Failed to calculate interdiff for this file.

NEW
knotserver/internal.go
··· 3 import ( 4 "context" 5 "encoding/json" 6 "fmt" 7 "log/slog" 8 "net/http" ··· 145 return fmt.Errorf("failed to open git repo at ref %s: %w", line.Ref, err) 146 } 147 148 - meta := gr.RefUpdateMeta(line) 149 150 metaRecord := meta.AsRecord() 151 ··· 169 EventJson: string(eventJson), 170 } 171 172 - return h.db.InsertEvent(event, h.n) 173 } 174 175 func (h *InternalHandle) triggerPipeline(clientMsgs *[]string, line git.PostReceiveLine, gitUserDid, repoDid, repoName string, pushOptions PushOptions) error {
··· 3 import ( 4 "context" 5 "encoding/json" 6 + "errors" 7 "fmt" 8 "log/slog" 9 "net/http" ··· 146 return fmt.Errorf("failed to open git repo at ref %s: %w", line.Ref, err) 147 } 148 149 + var errs error 150 + meta, err := gr.RefUpdateMeta(line) 151 + errors.Join(errs, err) 152 153 metaRecord := meta.AsRecord() 154 ··· 172 EventJson: string(eventJson), 173 } 174 175 + return errors.Join(errs, h.db.InsertEvent(event, h.n)) 176 } 177 178 func (h *InternalHandle) triggerPipeline(clientMsgs *[]string, line git.PostReceiveLine, gitUserDid, repoDid, repoName string, pushOptions PushOptions) error {