refactor(git): split status code parsing into status.lua

This commit is contained in:
2026-04-30 17:24:11 +02:00
parent 9f44c9de40
commit eebe191371
4 changed files with 57 additions and 52 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ local Revision = require("git.revision")
local diff = require("git.diff")
local object = require("git.object")
local repo = require("git.repo")
local status = require("git.status")
local util = require("git.util")
local M = {}
@@ -99,7 +100,7 @@ local function format_entry(entry)
if not code then
return nil
end
local char, hl = repo.indicator(code)
local char, hl = status.indicator(code)
if not char then
return nil
end
@@ -177,7 +178,7 @@ local function parse_porcelain(stdout)
if x == "?" and y == "?" then
entry.section = "Untracked"
table.insert(groups.Untracked, entry)
elseif repo.UNMERGED[x .. y] then
elseif status.UNMERGED[x .. y] then
entry.section = "Unmerged"
table.insert(groups.Unmerged, entry)
else