Skip to content

Commit 2476693

Browse files
ten3robertspritchett
authored andcommitted
fix: stylua
1 parent bcafbc9 commit 2476693

File tree

2 files changed

+28
-30
lines changed

2 files changed

+28
-30
lines changed

lua/neogit/popups/fetch.lua

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,33 @@ end
2121

2222
function M.create()
2323
local p = popup
24-
.builder()
25-
:name("NeogitFetchPopup")
26-
:switch("p", "prune", "Prune deleted branches", false)
27-
:switch("t", "tags", "Fetch all tags", false)
28-
:action("p", "Fetch from pushremote", function(popup)
29-
30-
fetch_from("pushremote", "origin", status.repo.head.branch, popup:get_arguments())
31-
end)
32-
:action("u", "Fetch from upstream", function(popup)
33-
34-
local upstream = git.branch.get_upstream()
35-
if not upstream then
36-
return
37-
end
38-
39-
fetch_from(upstream.remote, upstream.remote, "", popup:get_arguments())
40-
end)
41-
:action("a", "Fetch from all remotes", function(popup)
42-
local args = popup:get_arguments()
43-
table.insert(args, "--all")
44-
45-
fetch_from("all remotes", "", "", args)
46-
end)
47-
:action("e", "Fetch from elsewhere", function(popup)
48-
local remote = input.get_user_input("remote: ")
49-
local branch = git.branch.prompt_for_branch()
50-
fetch_from(remote .. ' ' .. branch, remote, branch, popup:get_arguments())
51-
end)
52-
:build()
24+
.builder()
25+
:name("NeogitFetchPopup")
26+
:switch("p", "prune", "Prune deleted branches", false)
27+
:switch("t", "tags", "Fetch all tags", false)
28+
:action("p", "Fetch from pushremote", function(popup)
29+
fetch_from("pushremote", "origin", status.repo.head.branch, popup:get_arguments())
30+
end)
31+
:action("u", "Fetch from upstream", function(popup)
32+
local upstream = git.branch.get_upstream()
33+
if not upstream then
34+
return
35+
end
36+
37+
fetch_from(upstream.remote, upstream.remote, "", popup:get_arguments())
38+
end)
39+
:action("a", "Fetch from all remotes", function(popup)
40+
local args = popup:get_arguments()
41+
table.insert(args, "--all")
42+
43+
fetch_from("all remotes", "", "", args)
44+
end)
45+
:action("e", "Fetch from elsewhere", function(popup)
46+
local remote = input.get_user_input("remote: ")
47+
local branch = git.branch.prompt_for_branch()
48+
fetch_from(remote .. " " .. branch, remote, branch, popup:get_arguments())
49+
end)
50+
:build()
5351

5452
p:show()
5553

lua/neogit/popups/help.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function M.create(env)
3232
require("neogit.popups.branch").create()
3333
end)
3434
:action("f", "Fetch", function()
35-
require('neogit.popups.fetch').create()
35+
require("neogit.popups.fetch").create()
3636
end)
3737
:action("$", "Git Command History", function()
3838
GitCommandHistory:new():show()

0 commit comments

Comments
 (0)