diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-10 17:31:23 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-11 17:07:49 +1000 |
commit | 6fbe660f96419e27f13004b2afede5272f9eb9f7 (patch) | |
tree | 43d36ca7536404ee1df8a72ef5e754c8f5dba51d /pkg/gui/files_panel.go | |
parent | 74320f00752926b42f0e4d6f84b3816d7a0134a9 (diff) |
full coverage for logging commands
Diffstat (limited to 'pkg/gui/files_panel.go')
-rw-r--r-- | pkg/gui/files_panel.go | 11 |
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{ |