Compare commits
No commits in common. "38a299ab552acad8d7e2b3ae58e1c569c252084b" and "fa7b2e1e0a8b54d27c499828233d2b05d5d7661a" have entirely different histories.
38a299ab55
...
fa7b2e1e0a
3 changed files with 8 additions and 23 deletions
|
|
@ -43,8 +43,8 @@
|
||||||
.lazy = true,
|
.lazy = true,
|
||||||
},
|
},
|
||||||
.wio = .{
|
.wio = .{
|
||||||
.url = "git+https://github.com/neurocyte/wio?ref=master#7e3182c0cd4579bb9d6b8cddb862396a3093e62f",
|
.url = "git+https://github.com/neurocyte/wio?ref=master#a5f4ccb81fb6bafa348196747a0051cc65e10db9",
|
||||||
.hash = "wio-0.0.0-8xHrrzsKBgD1RO_CdfiIc_fe7Ye-Otk06-J1Fg_0o8_p",
|
.hash = "wio-0.0.0-8xHrr0MKBgAYo_rlL6A2llfOLjikoWrPdV6Aml3OOBwJ",
|
||||||
.lazy = true,
|
.lazy = true,
|
||||||
},
|
},
|
||||||
.sokol = .{
|
.sokol = .{
|
||||||
|
|
|
||||||
25
src/git.zig
25
src/git.zig
|
|
@ -32,18 +32,11 @@ pub fn current_branch(context_: usize) Error!void {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn workspace_files(context: usize) Error!void {
|
pub fn workspace_files(context: usize) Error!void {
|
||||||
return if (is_file(".gitmodules"))
|
return git_line_output(
|
||||||
git_line_output(
|
context,
|
||||||
context,
|
@src().fn_name,
|
||||||
@src().fn_name,
|
.{ "ls-files", "--cached", "--others", "--exclude-standard" },
|
||||||
.{ "ls-files", "--cached", "--exclude-standard", "--recurse-submodules" },
|
);
|
||||||
)
|
|
||||||
else
|
|
||||||
git_line_output(
|
|
||||||
context,
|
|
||||||
@src().fn_name,
|
|
||||||
.{ "ls-files", "--cached", "--others", "--exclude-standard" },
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn workspace_ignored_files(context: usize) Error!void {
|
pub fn workspace_ignored_files(context: usize) Error!void {
|
||||||
|
|
@ -418,12 +411,4 @@ pub fn blame(context_: usize, file_path: []const u8) !void {
|
||||||
}.result, exit_null(tag));
|
}.result, exit_null(tag));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_file(rel_path: []const u8) bool {
|
|
||||||
var path_buf: [std.fs.max_path_bytes]u8 = undefined;
|
|
||||||
const abs_path = std.fs.cwd().realpath(rel_path, &path_buf) catch return false;
|
|
||||||
var file = std.fs.openFileAbsolute(abs_path, .{ .mode = .read_only }) catch return false;
|
|
||||||
defer file.close();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const module_name = @typeName(@This());
|
const module_name = @typeName(@This());
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ pub fn fromWioModifiers(modifiers: wio.Modifiers) Mods {
|
||||||
.shift = modifiers.shift,
|
.shift = modifiers.shift,
|
||||||
.alt = modifiers.alt,
|
.alt = modifiers.alt,
|
||||||
.ctrl = modifiers.control,
|
.ctrl = modifiers.control,
|
||||||
.super = modifiers.gui,
|
.super = modifiers.super,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue