summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git_commands/sync.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/git_commands/sync.go')
-rw-r--r--pkg/commands/git_commands/sync.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/commands/git_commands/sync.go b/pkg/commands/git_commands/sync.go
index 515d0e4d8..c56422029 100644
--- a/pkg/commands/git_commands/sync.go
+++ b/pkg/commands/git_commands/sync.go
@@ -53,7 +53,7 @@ type FetchOptions struct {
}
// Fetch fetch git repo
-func (self *SyncCommands) Fetch(opts FetchOptions) error {
+func (self *SyncCommands) FetchCmdObj(opts FetchOptions) oscommands.ICmdObj {
cmdArgs := NewGitCmd("fetch").ToArgv()
cmdObj := self.cmd.New(cmdArgs)
@@ -62,7 +62,12 @@ func (self *SyncCommands) Fetch(opts FetchOptions) error {
} else {
cmdObj.PromptOnCredentialRequest()
}
- return cmdObj.WithMutex(self.syncMutex).Run()
+ return cmdObj.WithMutex(self.syncMutex)
+}
+
+func (self *SyncCommands) Fetch(opts FetchOptions) error {
+ cmdObj := self.FetchCmdObj(opts)
+ return cmdObj.Run()
}
type PullOptions struct {