aboutsummaryrefslogtreecommitdiff
path: root/receivepack/service/apply.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-08 03:46:13 +0800
committerGravatar Runxi Yu2026-03-08 03:46:13 +0800
commit4043486a652566923b27d1a90eedcdc8d9b0b3ea (patch)
treef43cbaae89ffebe95f973b6de142e0f1a0e091b6 /receivepack/service/apply.go
parentformat/pack/ingest: Thin pack fixing progress (diff)
signatureNo signature
*: Reformat v0.1.75
Diffstat (limited to 'receivepack/service/apply.go')
-rw-r--r--receivepack/service/apply.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/receivepack/service/apply.go b/receivepack/service/apply.go
index 0f9e07f9..e432141b 100644
--- a/receivepack/service/apply.go
+++ b/receivepack/service/apply.go
@@ -41,6 +41,7 @@ func (service *Service) applyAtomic(result *Result, commands []Command) error {
for _, command := range commands {
result.Commands = append(result.Commands, successCommandResult(command))
}
+
utils.WriteProgressf(service.opts.Progress, "updating refs: done.\n")
return nil
@@ -48,6 +49,7 @@ func (service *Service) applyAtomic(result *Result, commands []Command) error {
func (service *Service) applyBatch(result *Result, commands []Command) error {
total := len(commands)
+
utils.WriteProgressf(service.opts.Progress, "updating refs...\r")
batch, err := service.opts.Refs.BeginBatch()
@@ -77,10 +79,12 @@ func (service *Service) applyBatch(result *Result, commands []Command) error {
}
result.Commands = append(result.Commands, item)
+
utils.WriteProgressf(service.opts.Progress, "updating refs: %d/%d\r", i+1, total)
}
result.Applied = appliedAny
+
utils.WriteProgressf(service.opts.Progress, "updating refs: done.\n")
return nil