Skip to content

Commit

Permalink
Don't use interactivity in this context
Browse files Browse the repository at this point in the history
  • Loading branch information
CKolkey committed Aug 3, 2023
1 parent 21a0f7b commit fa4342d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/neogit/popups/fetch/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ local popup = require("neogit.lib.popup")
local M = {}

function M.create()
local upstream = git.branch.upstream_remote()
-- TODO: Match the logic in Magit for a new branch without an upstream/pushremote
local upstream = git.branch.upstream_remote { interactive = false }

local p = popup
.builder()
:name("NeogitFetchPopup")
:switch("p", "prune", "Prune deleted branches")
:switch("t", "tags", "Fetch all tags")
:group_heading("Fetch from")
:action("p", git.branch.pushRemote_label(), actions.fetch_pushremote)
:action("p", git.branch.pushRemote_label({ branch = false }), actions.fetch_pushremote)
:action_if(upstream, "u", upstream, actions.fetch_upstream)
:action("e", "elsewhere", actions.fetch_elsewhere)
:action("a", "all remotes", actions.fetch_all_remotes)
Expand Down

0 comments on commit fa4342d

Please sign in to comment.