shithub: furgit

Download patch

ref: 2493e63454b15c2124dcf669849377f61f0d5243
parent: 0bf0a124641dc5f7594b65a3991a43f0ecc07ddb
author: Runxi Yu <me@runxiyu.org>
date: Sun Mar 8 09:29:23 EDT 2026

receivepack: Report updating ref failures

--- a/receivepack/service/apply.go
+++ b/receivepack/service/apply.go
@@ -69,11 +69,13 @@
 	}
 
 	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 @@
 
 	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
 }
--