Change summary
repository/git.go | 3 ++-
repository/gogit.go | 2 +-
repository/mock_repo.go | 3 ++-
3 files changed, 5 insertions(+), 3 deletions(-)
Detailed changes
@@ -5,6 +5,7 @@ import (
"bytes"
"fmt"
"path"
+ "path/filepath"
"strings"
"sync"
@@ -131,7 +132,7 @@ func (repo *GitRepo) Keyring() Keyring {
// GetPath returns the path to the repo.
func (repo *GitRepo) GetPath() string {
- return repo.path
+ return filepath.FromSlash(repo.path)
}
// GetUserName returns the name the the user has used to configure git
@@ -197,7 +197,7 @@ func (repo *GoGitRepo) Keyring() Keyring {
// GetPath returns the path to the repo.
func (repo *GoGitRepo) GetPath() string {
- return repo.path
+ return filepath.FromSlash(repo.path)
}
// GetUserName returns the name the the user has used to configure git
@@ -3,6 +3,7 @@ package repository
import (
"crypto/sha1"
"fmt"
+ "path/filepath"
"strings"
"github.com/99designs/keyring"
@@ -88,7 +89,7 @@ func NewMockRepoCommon() *mockRepoCommon {
// GetPath returns the path to the repo.
func (r *mockRepoCommon) GetPath() string {
- return "~/mockRepo/"
+ return filepath.FromSlash("~/mockRepo/")
}
func (r *mockRepoCommon) GetUserName() (string, error) {