complete rewrite in zig...

upon release v5.0 I introduced a regression through my caching system in
which I naively thought that the mtime of a directory was updated by
child directories when it actually only updates for child files.

This rewrite introduces a new caching system where instead of relying on
mtime of the index file I simply store the path to, at most, 10
untracked paths and check those before anything else. This results in
slower, but more reliable caching. However due to Zig's ease of use I
was able to bring down the overall use when statically linked to libgit2
so overall XD should be faster \o/.

I also added a visor? (O) to represent an in progress rebase.
This commit is contained in:
Squibid 2026-02-09 18:59:49 -05:00
parent a205314c69
commit eb0f31daa7
Signed by: squibid
GPG key ID: BECE5684D3C4005D
17 changed files with 909 additions and 724 deletions

19
build.zig.zon Normal file
View file

@ -0,0 +1,19 @@
.{
.name = .XD,
.version = "6.0.0",
.fingerprint = 0x420a402a481c77c1, // Changing this has security and trust implications.
.minimum_zig_version = "0.15.2",
.dependencies = .{
.libgit2 = .{
.url = "git+https://github.com/allyourcodebase/libgit2#58dfd002d47a8c9fbd99d4a939cb343172590e1b",
.hash = "libgit2-1.9.0-uizqTQnZAADyPOmBklxzj_lrnfJoRLRDBbbTvi28SrZX",
},
},
.paths = .{
"build.zig",
"build.zig.zon",
"src",
"LICENSE",
"README.md",
},
}