mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-11-24 08:52:21 +02:00
Made some small inprovements
This commit is contained in:
parent
21a808a52b
commit
6d0fa8bc29
@ -34,8 +34,7 @@ func (gui *Gui) handleCreatePullRequestPress(g *gocui.Gui, v *gocui.View) error
|
||||
}
|
||||
|
||||
func (gui *Gui) handleGitFetch(g *gocui.Gui, v *gocui.View) error {
|
||||
_ = gui.fetch(g, true)
|
||||
return nil
|
||||
return gui.fetch(g, v, true)
|
||||
}
|
||||
|
||||
func (gui *Gui) handleForceCheckout(g *gocui.Gui, v *gocui.View) error {
|
||||
|
@ -371,9 +371,9 @@ func (gui *Gui) promptAnonymousReporting() error {
|
||||
})
|
||||
}
|
||||
|
||||
func (gui *Gui) fetch(g *gocui.Gui, canSskForCredentials bool) error {
|
||||
func (gui *Gui) fetch(g *gocui.Gui, v *gocui.View, canSskForCredentials bool) error {
|
||||
err := gui.GitCommand.Fetch(func(passOrUname string) string {
|
||||
return gui.waitForPassUname(gui.g, gui.g.CurrentView(), passOrUname)
|
||||
return gui.waitForPassUname(gui.g, v, passOrUname)
|
||||
}, canSskForCredentials)
|
||||
|
||||
if canSskForCredentials && err != nil && strings.Contains(err.Error(), "exit status 128") {
|
||||
@ -382,7 +382,7 @@ func (gui *Gui) fetch(g *gocui.Gui, canSskForCredentials bool) error {
|
||||
close := func(g *gocui.Gui, v *gocui.View) error {
|
||||
return nil
|
||||
}
|
||||
_ = gui.createConfirmationPanel(g, g.CurrentView(), gui.Tr.SLocalize("Error"), coloredMessage, close, close)
|
||||
_ = gui.createConfirmationPanel(g, v, gui.Tr.SLocalize("Error"), coloredMessage, close, close)
|
||||
}
|
||||
|
||||
gui.refreshStatus(g)
|
||||
@ -442,12 +442,12 @@ func (gui *Gui) Run() error {
|
||||
}
|
||||
|
||||
go func() {
|
||||
err := gui.fetch(g, false)
|
||||
err := gui.fetch(g, g.CurrentView(), false)
|
||||
if err != nil && strings.Contains(err.Error(), "exit status 128") {
|
||||
_ = gui.createConfirmationPanel(g, g.CurrentView(), gui.Tr.SLocalize("NoAutomaticGitFetchTitle"), gui.Tr.SLocalize("NoAutomaticGitFetchBody"), nil, nil)
|
||||
} else {
|
||||
gui.goEvery(g, time.Second*60, func(g *gocui.Gui) error {
|
||||
return gui.fetch(g, false)
|
||||
return gui.fetch(g, g.CurrentView(), false)
|
||||
})
|
||||
}
|
||||
}()
|
||||
|
@ -417,10 +417,10 @@ func addDutch(i18nObject *i18n.Bundle) error {
|
||||
Other: `fetch`,
|
||||
}, &i18n.Message{
|
||||
ID: "NoAutomaticGitFetchTitle",
|
||||
Other: `No automatic git fetch`,
|
||||
Other: `Geen automatiese git fetch`,
|
||||
}, &i18n.Message{
|
||||
ID: "NoAutomaticGitFetchBody",
|
||||
Other: `Lazygit can't use "git fetch" in a private repo use f in the branches panel to run git fetch manually`,
|
||||
Other: `Lazygit kan niet "git fetch" uitvoeren in een privé repository, gebruik f in het branches paneel om "git fetch" manueel uit te voeren`,
|
||||
}, &i18n.Message{
|
||||
ID: "StageLines",
|
||||
Other: `stage individual hunks/lines`,
|
||||
|
@ -428,7 +428,7 @@ func addEnglish(i18nObject *i18n.Bundle) error {
|
||||
Other: `No automatic git fetch`,
|
||||
}, &i18n.Message{
|
||||
ID: "NoAutomaticGitFetchBody",
|
||||
Other: `Lazygit can't use "git fetch" in a private repo use f in the branches panel to run git fetch manually`,
|
||||
Other: `Lazygit can't use "git fetch" in a private repo use f in the branches panel to run "git fetch" manually`,
|
||||
}, &i18n.Message{
|
||||
ID: "StageLines",
|
||||
Other: `stage individual hunks/lines`,
|
||||
|
@ -403,7 +403,7 @@ func addPolish(i18nObject *i18n.Bundle) error {
|
||||
Other: `No automatic git fetch`,
|
||||
}, &i18n.Message{
|
||||
ID: "NoAutomaticGitFetchBody",
|
||||
Other: `Lazygit can't use "git fetch" in a private repo use f in the branches panel to run git fetch manually`,
|
||||
Other: `Lazygit can't use "git fetch" in a private repo use f in the branches panel to run "git fetch" manually`,
|
||||
}, &i18n.Message{
|
||||
ID: "StageLines",
|
||||
Other: `stage individual hunks/lines`,
|
||||
|
Loading…
Reference in New Issue
Block a user