From 2493e63454b15c2124dcf669849377f61f0d5243 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 8 Mar 2026 13:29:23 +0800 Subject: receivepack: Report updating ref failures --- receivepack/service/apply.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/receivepack/service/apply.go b/receivepack/service/apply.go index e432141b..bd4dc6e6 100644 --- a/receivepack/service/apply.go +++ b/receivepack/service/apply.go @@ -69,11 +69,13 @@ func (service *Service) applyBatch(result *Result, commands []Command) error { } appliedAny := false + failedCount := 0 for i, command := range commands { item := successCommandResult(command) if i < len(batchResults) && batchResults[i].Error != nil { item.Error = batchResults[i].Error.Error() + failedCount++ } else { appliedAny = true } @@ -85,7 +87,11 @@ func (service *Service) applyBatch(result *Result, commands []Command) error { result.Applied = appliedAny - utils.WriteProgressf(service.opts.Progress, "updating refs: done.\n") + if failedCount == 0 { + utils.WriteProgressf(service.opts.Progress, "updating refs: done.\n") + } else { + utils.WriteProgressf(service.opts.Progress, "updating refs: failed (%d/%d)\n", failedCount, total) + } return nil } -- cgit v1.3.1-10-gc9f91