╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Events.zig ───────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
800 if (local_oid == null and remote_oid == null) { 801 try evt.consume(repo_kind, repo_opts, io, allocator, repo, evt.events_ref, &.{}); 802 return null; 803 } 804 if (remote_oid != null) try evt.mergeEvents(repo_kind, repo_opts, io, allocator, repo, remote_ref); 805 try evt.consume(repo_kind, repo_opts, io, allocator, repo, evt.events_ref, &.{}); 806 807 const push_refspec = try std.fmt.allocPrint(allocator, "refs/heads/{s}:refs/heads/{s}", .{ evt.events_ref.name, evt.events_ref.name }); 808 defer allocator.free(push_refspec); 809 message.clearRetainingCapacity(); 810 repo.push(io, allocator, remote_name, push_refspec, false, push_transport_opts) catch |err| { 811 if (err == error.ServerReportedError and message.written().len != 0) return try allocator.dupe(u8, message.written()); 812 return err; 813 }; 814 message.clearRetainingCapacity(); 815 repo.fetch(io, allocator, remote_name, fetch_opts) catch |err| { 816 if (err == error.ServerReportedError and message.written().len != 0) return try allocator.dupe(u8, message.written()); 817 return err; 818 }; 819 }, 820 } 821 }, 822 } 823 return null; 824 } 825