Refactor git command context & pipeline (#36406)

Less and simpler code, fewer bugs
This commit is contained in:
wxiaoguang authored and GitHub committed 2026-01-21 01:35:14 +00:00
1 parent f6db180a80
commit 9ea91e036f
36 files changed
+286 -434

No files matched your search

+3 -3
View File
@@ -35,10 +35,10 @@ func init() {
}
}
func newProcessTypedContext(parent context.Context, desc string) (ctx context.Context, cancel context.CancelFunc) {
func newProcessTypedContext(parent context.Context, desc string) (context.Context, context.CancelFunc) {
// the "process manager" also calls "log.Trace()" to output logs, so if we want to create new contexts by the manager, we need to disable the trace temporarily
process.TraceLogDisable(true)
defer process.TraceLogDisable(false)
ctx, _, cancel = process.GetManager().AddTypedContext(parent, desc, process.SystemProcessType, false)
return ctx, cancel
ctx, _, finished := process.GetManager().AddTypedContext(parent, desc, process.SystemProcessType, false)
return ctx, context.CancelFunc(finished)
}