feat: show ahead and behind commits in winbar

This commit is contained in:
Jakub F. Bortlík
2026-03-02 12:41:28 +01:00
parent d67484fe87
commit f7c7a93da4
5 changed files with 66 additions and 46 deletions

View File

@@ -55,6 +55,9 @@ end
---Makes API call to get the discussion data, stores it in the state, and calls the callback
---@param callback function|nil
M.load_discussions = function(callback)
local git = require("gitlab.git")
local ahead, behind = git.get_ahead_behind(git.get_current_branch(), git.get_remote_branch())
state.ahead_behind = { ahead, behind }
state.discussion_tree.last_updated = nil
state.load_new_state("discussion_data", function(data)
if not state.DISCUSSION_DATA then