Skip to content

Commit fe77431

Browse files
committed
fix for remoteless fetch bug in windows (resolves #104)
1 parent a54b291 commit fe77431

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

git/git_fetch.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ import (
1616
// windowsFetch is used for fetching changes using the git client if the platform is windows
1717
// go-git fetch fails in windows due to SSH authentication error
1818
func windowsFetch(repoPath string, remoteName string, branch string) *model.FetchResult {
19-
args := []string{"fetch", remoteName, branch}
19+
var args []string
20+
if remoteName == "" && branch == "" {
21+
args = []string{"fetch"}
22+
} else {
23+
args = []string{"fetch", remoteName, branch}
24+
}
2025
cmd := utils.GetGitClient(repoPath, args)
2126
cmdStr, cmdErr := cmd.Output()
2227

0 commit comments

Comments
 (0)