refactor(git): split status code parsing into status.lua
This commit is contained in:
+3
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user