Skip to content

Commit 1bfcdee

Browse files
earl-warrenGusted
andauthored
Make pushUpdate error verbose (#28263)
- Push commits updates are run in a queue and updates can come from less traceable places such as Git over SSH, therefor add more information about on which repository the pushUpdate failed. Refs: https://codeberg.org/forgejo/forgejo/pulls/1723 (cherry picked from commit 37ab9460394800678d2208fed718e719d7a5d96f) Co-authored-by: Gusted <[email protected]>
1 parent a7de14e commit 1bfcdee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

services/repository/push.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ var pushQueue *queue.WorkerPoolQueue[[]*repo_module.PushUpdateOptions]
3535
func handler(items ...[]*repo_module.PushUpdateOptions) [][]*repo_module.PushUpdateOptions {
3636
for _, opts := range items {
3737
if err := pushUpdates(opts); err != nil {
38-
log.Error("pushUpdate failed: %v", err)
38+
// Username and repository stays the same between items in opts.
39+
pushUpdate := opts[0]
40+
log.Error("pushUpdate[%s/%s] failed: %v", pushUpdate.RepoUserName, pushUpdate.RepoName, err)
3941
}
4042
}
4143
return nil

0 commit comments

Comments
 (0)