perf(git): cache index blob sha, drop rev-parse from the edit path

This commit is contained in:
2026-05-20 06:25:14 +02:00
parent f77d26db6b
commit d629302625
3 changed files with 50 additions and 7 deletions
+1 -2
View File
@@ -262,8 +262,7 @@ local function recompute(buf)
if not state then
return
end
local r = state.repo
local new_sha = r:rev_parse(":" .. state.rel, true)
local new_sha = state.repo:index_sha(state.rel)
if not new_sha then
state.index = nil
state.index_sha = nil