╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ progress.zig ─────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯
119 try response.progress(self.writer, text); 120 } else { 121 try xit.net_server_pkt.sendSideband(self.writer, 2, text); 122 try self.writer.flush(); 123 } 124 } 125 }; 126 127 // whether the client the work is reporting to has hung up, or its push has 128 // outgrown the repo size limit. only a sideband reporter probes, so any other 129 // context never cancels. 130 pub fn cancelled(comptime repo_opts: rp.RepoOpts(.xit), progress_ctx_maybe: ?repo_opts.ProgressCtx) bool { 131 if (repo_opts.ProgressCtx != *Sideband) return false; 132 const progress_ctx = progress_ctx_maybe orelse return false; 133 return progress_ctx.gone or progress_ctx.too_large; 134 } 135