aboutsummaryrefslogtreecommitdiff
path: root/receivepack
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-08 13:29:23 +0800
committerGravatar Runxi Yu2026-03-08 13:29:23 +0800
commit2493e63454b15c2124dcf669849377f61f0d5243 (patch)
treeb0b3fabb5c256fbaf9e1f8b81914ce57e641080c /receivepack
parentcmd/receivepack9418: Profile (diff)
signatureNo signature
receivepack: Report updating ref failures
Diffstat (limited to 'receivepack')
-rw-r--r--receivepack/service/apply.go8
1 files changed, 7 insertions, 1 deletions
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
}