oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package wire
2
3// WithoutUnfinished is a step report as an instance below
4// ProtocolUnfinishedWork must read it. Such an instance drops the reason
5// of a done Engineering step, so a timed-out step's pushed work (done,
6// step_timeout) would read as finished: it goes as the step failing
7// step_timeout, its candidate unpublished, as before protocol 32. This
8// holds for a report saved while the instance spoke 32 and sent after it
9// went back (Encode at each send). Reports whether it changed rep.
10func WithoutUnfinished(rep *StepReport) bool {
11 if rep.State != StepDone || rep.Reason != "step_timeout" {
12 return false
13 }
14 rep.State, rep.Pushed, rep.CandidateSHA, rep.Askable = StepFailed, false, "", false
15 return true
16}
17