feat(ENG-21324): Implement hosted_git_info.zig (#24138)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
This commit is contained in:
Marko Vejnovic
2025-10-29 19:29:04 -07:00
committed by GitHub
parent a7fc6eb354
commit 1d728bb778
14 changed files with 4453 additions and 597 deletions

View File

@@ -233,26 +233,6 @@ pub fn normalizeSlashesOnly(buf: []u8, utf8: []const u8, comptime desired_slash:
return normalizeSlashesOnlyT(u8, buf, utf8, desired_slash, false);
}
pub fn toWDirNormalized(wbuf: []u16, utf8: []const u8) [:0]const u16 {
var renormalized: ?*bun.PathBuffer = null;
defer if (renormalized) |r| bun.path_buffer_pool.put(r);
var path_to_use = utf8;
if (bun.strings.containsChar(utf8, '/')) {
renormalized = bun.path_buffer_pool.get();
@memcpy(renormalized.?[0..utf8.len], utf8);
for (renormalized.?[0..utf8.len]) |*c| {
if (c.* == '/') {
c.* = '\\';
}
}
path_to_use = renormalized.?[0..utf8.len];
}
return toWDirPath(wbuf, path_to_use);
}
pub fn toWPath(wbuf: []u16, utf8: []const u8) [:0]u16 {
return toWPathMaybeDir(wbuf, utf8, false);
}