diff --git a/lua/neogit/lib/git/pull.lua b/lua/neogit/lib/git/pull.lua index 7e4b128ba..85ee0cfff 100644 --- a/lua/neogit/lib/git/pull.lua +++ b/lua/neogit/lib/git/pull.lua @@ -9,14 +9,14 @@ function M.pull_interactive(remote, branch, args) end local function update_unpulled(state) - local upstream_unpulled = {} - local pushRemote_unpulled = {} + state.upstream.unpulled.items = {} + state.pushRemote.unpulled.items = {} if state.upstream.ref then local result = cli.log.oneline.for_range("..@{upstream}").show_popup(false).call():trim().stdout for _, name in ipairs(result) do - table.insert(upstream_unpulled, { name = name }) + table.insert(state.upstream.unpulled.items, { name = name }) end end @@ -25,12 +25,9 @@ local function update_unpulled(state) local result = cli.log.oneline.for_range(".." .. pushRemote).show_popup(false).call():trim().stdout for _, name in ipairs(result) do - table.insert(pushRemote_unpulled, { name = name }) + table.insert(state.pushRemote.unpulled.items, { name = name }) end end - - state.upstream.unpulled.items = upstream_unpulled - state.pushRemote.unpulled.items = pushRemote_unpulled end function M.register(meta)