╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ try.zig ──────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
1344 .description = "This patch tracks the feature branch in this repo without creating a fork.", 1345 .tags = "feature", 1346 .source_branch = "feature", 1347 .target_branch = "master", 1348 }, null, patch_author); 1349 } 1350 1351 // recursively copy the contents of src_dir into dest_dir 1352 fn copyDir(io: std.Io, src_dir: std.Io.Dir, dest_dir: std.Io.Dir) !void { 1353 var iter = src_dir.iterate(); 1354 while (try iter.next(io)) |entry| { 1355 switch (entry.kind) { 1356 .file => try src_dir.copyFile(entry.name, dest_dir, entry.name, io, .{}), 1357 .directory => { 1358 try dest_dir.createDirPath(io, entry.name); 1359 var dest_entry_dir = try dest_dir.openDir(io, entry.name, .{ .access_sub_paths = true, .iterate = true, .follow_symlinks = false }); 1360 defer dest_entry_dir.close(io); 1361 var src_entry_dir = try src_dir.openDir(io, entry.name, .{ .access_sub_paths = true, .iterate = true, .follow_symlinks = false }); 1362 defer src_entry_dir.close(io); 1363 try copyDir(io, src_entry_dir, dest_entry_dir); 1364 }, 1365 else => {}, 1366 } 1367 } 1368 } 1369