summaryrefslogtreecommitdiffstats
path: root/pkg/gui/files_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-04-10 17:31:23 +1000
committerJesse Duffield <jessedduffield@gmail.com>2021-04-11 17:07:49 +1000
commit6fbe660f96419e27f13004b2afede5272f9eb9f7 (patch)
tree43d36ca7536404ee1df8a72ef5e754c8f5dba51d /pkg/gui/files_panel.go
parent74320f00752926b42f0e4d6f84b3816d7a0134a9 (diff)
full coverage for logging commands
Diffstat (limited to 'pkg/gui/files_panel.go')
-rw-r--r--pkg/gui/files_panel.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go
index a09e8158f..795152bae 100644
--- a/pkg/gui/files_panel.go
+++ b/pkg/gui/files_panel.go
@@ -609,6 +609,8 @@ func (gui *Gui) handlePullFiles() error {
return nil
}
+ span := "Pull"
+
currentBranch := gui.currentBranch()
if currentBranch == nil {
// need to wait for branches to refresh
@@ -624,7 +626,7 @@ func (gui *Gui) handlePullFiles() error {
}
for branchName, branch := range conf.Branches {
if branchName == currentBranch.Name {
- return gui.pullFiles(PullFilesOptions{RemoteName: branch.Remote, BranchName: branch.Name})
+ return gui.pullFiles(PullFilesOptions{RemoteName: branch.Remote, BranchName: branch.Name, span: span})
}
}
@@ -639,17 +641,18 @@ func (gui *Gui) handlePullFiles() error {
}
return gui.createErrorPanel(errorMessage)
}
- return gui.pullFiles(PullFilesOptions{})
+ return gui.pullFiles(PullFilesOptions{span: span})
},
})
}
- return gui.pullFiles(PullFilesOptions{})
+ return gui.pullFiles(PullFilesOptions{span: span})
}
type PullFilesOptions struct {
RemoteName string
BranchName string
+ span string
}
func (gui *Gui) pullFiles(opts PullFilesOptions) error {
@@ -669,7 +672,7 @@ func (gui *Gui) pullWithMode(mode string, opts PullFilesOptions) error {
gui.Mutexes.FetchMutex.Lock()
defer gui.Mutexes.FetchMutex.Unlock()
- gitCommand := gui.GitCommand.WithSpan("Pull")
+ gitCommand := gui.GitCommand.WithSpan(opts.span)
err := gitCommand.Fetch(
commands.FetchOptions{